C# Класс Stumps.FluentStumpExtensions

A class that provides a set of Fluent extension methods to T:Stumps.Stump objects.
Показать файл Открыть проект

Открытые методы

Метод Описание
DelayedBy ( this stump, int delayMilliseconds ) : Stump

Specifies the amount of time the server delays before responding with the Stump.

DropsConnection ( this stump ) : Stump

Asserts that the T:Stumps.Stump will drop the connection immediately.

MatchingBody ( this stump, byte buffer ) : Stump

Requires the incoming HTTP request to match the specified body.

MatchingBodyContaining ( this stump, string text ) : Stump

Requires the incoming HTTP request to contain the specified text in the body.

MatchingHeader ( this stump, string headerName, string headerValue ) : Stump

Requires the incoming HTTP request to match the specified header.

MatchingMethod ( this stump, string httpMethod ) : Stump

Requires the incoming HTTP request to match the specified HTTP method.

MatchingRule ( this stump, IStumpRule rule ) : Stump

Requires the incoming HTTP request to match the specified T:Stumps.IStumpRule.

Responds ( this stump ) : BasicHttpResponse

Asserts that the T:Stumps.Stump will respond with a T:Stumps.BasicHttpResponse.

Приватные методы

Метод Описание
CreateMd5Hash ( byte buffer ) : string

Creates an MD5 hash for the specified bytes.

MatchingUrl ( this stump, string url ) : Stump

Описание методов

DelayedBy() публичный статический Метод

Specifies the amount of time the server delays before responding with the Stump.
is null.
public static DelayedBy ( this stump, int delayMilliseconds ) : Stump
stump this The intercepting incomming HTTP requests.
delayMilliseconds int The amount of time, in milliseconds, the response is delayed.
Результат Stump

DropsConnection() публичный статический Метод

Asserts that the T:Stumps.Stump will drop the connection immediately.
is null.
public static DropsConnection ( this stump ) : Stump
stump this The intercepting incomming HTTP requests.
Результат Stump

MatchingBody() публичный статический Метод

Requires the incoming HTTP request to match the specified body.
is null.
public static MatchingBody ( this stump, byte buffer ) : Stump
stump this The intercepting incomming HTTP requests.
buffer byte The array of bytes for the body.
Результат Stump

MatchingBodyContaining() публичный статический Метод

Requires the incoming HTTP request to contain the specified text in the body.
is null.
public static MatchingBodyContaining ( this stump, string text ) : Stump
stump this The intercepting incomming HTTP requests.
text string The text that must be contained within the body.
Результат Stump

MatchingHeader() публичный статический Метод

Requires the incoming HTTP request to match the specified header.
is null.
public static MatchingHeader ( this stump, string headerName, string headerValue ) : Stump
stump this The intercepting incomming HTTP requests.
headerName string The name of the header to match.
headerValue string The value of the header to match.
Результат Stump

MatchingMethod() публичный статический Метод

Requires the incoming HTTP request to match the specified HTTP method.
is null.
public static MatchingMethod ( this stump, string httpMethod ) : Stump
stump this The intercepting incomming HTTP requests.
httpMethod string The HTTP method to match.
Результат Stump

MatchingRule() публичный статический Метод

Requires the incoming HTTP request to match the specified T:Stumps.IStumpRule.
is null.
public static MatchingRule ( this stump, IStumpRule rule ) : Stump
stump this The intercepting incomming HTTP requests.
rule IStumpRule The required to match.
Результат Stump

Responds() публичный статический Метод

Asserts that the T:Stumps.Stump will respond with a T:Stumps.BasicHttpResponse.
is null.
public static Responds ( this stump ) : BasicHttpResponse
stump this The intercepting incomming HTTP requests.
Результат BasicHttpResponse