C# Class Stumps.FluentStumpExtensions

A class that provides a set of Fluent extension methods to T:Stumps.Stump objects.
Afficher le fichier Open project: Cayan-LLC/stumps

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
CreateMd5Hash ( byte buffer ) : string

Creates an MD5 hash for the specified bytes.

MatchingUrl ( this stump, string url ) : Stump

Method Details

DelayedBy() public static méthode

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.
Résultat Stump

DropsConnection() public static méthode

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.
Résultat Stump

MatchingBody() public static méthode

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.
Résultat Stump

MatchingBodyContaining() public static méthode

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.
Résultat Stump

MatchingHeader() public static méthode

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.
Résultat Stump

MatchingMethod() public static méthode

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.
Résultat Stump

MatchingRule() public static méthode

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.
Résultat Stump

Responds() public static méthode

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.
Résultat BasicHttpResponse