C# Class Stumps.Rules.BodyMatchRule

A class representing a Stump rule that evaluates the exact content of the body of an HTTP request.
Inheritance: IStumpRule
Afficher le fichier Open project: Cayan-LLC/stumps Class Usage Examples

Méthodes publiques

Méthode Description
BodyMatchRule ( ) : System

Initializes a new instance of the T:Stumps.Rules.BodyMatchRule class.

BodyMatchRule ( int length, string md5Hash ) : System

Initializes a new instance of the T:Stumps.Rules.BodyMatchRule class.

GetRuleSettings ( ) : IEnumerable

Gets an enumerable list of T:Stumps.RuleSetting objects used to represent the current instance.

InitializeFromSettings ( IEnumerable settings ) : void

Initializes a rule from an enumerable list of T:Stumps.RuleSetting objects.

IsMatch ( IStumpsHttpRequest request ) : bool

Determines whether the specified request matches the rule.

Private Methods

Méthode Description
InitializeRule ( int length, string md5Hash ) : void

Initializes the rule.

IsHashEqual ( byte hashBytes ) : bool

Determines whether the bytes in a specified hash match the hash for the rule.

Method Details

BodyMatchRule() public méthode

Initializes a new instance of the T:Stumps.Rules.BodyMatchRule class.
public BodyMatchRule ( ) : System
Résultat System

BodyMatchRule() public méthode

Initializes a new instance of the T:Stumps.Rules.BodyMatchRule class.
must be equal or greater than 0. is null.
public BodyMatchRule ( int length, string md5Hash ) : System
length int The expected length of the body.
md5Hash string The MD5 hash of the body.
Résultat System

GetRuleSettings() public méthode

Gets an enumerable list of T:Stumps.RuleSetting objects used to represent the current instance.
public GetRuleSettings ( ) : IEnumerable
Résultat IEnumerable

InitializeFromSettings() public méthode

Initializes a rule from an enumerable list of T:Stumps.RuleSetting objects.
public InitializeFromSettings ( IEnumerable settings ) : void
settings IEnumerable The enumerable list of objects.
Résultat void

IsMatch() public méthode

Determines whether the specified request matches the rule.
public IsMatch ( IStumpsHttpRequest request ) : bool
request IStumpsHttpRequest The to evaluate.
Résultat bool