Class RegexExpression
Represents an expression that evaluates to True, if provided Regular Expression matches the content of the provided message.
Implements
Inherited Members
Namespace: Nevatech.Vsb.Repository.Security
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public sealed class RegexExpression : AuthorizationExpressionBase, IValidator, IEquatable<AuthorizationExpressionBase>, IExtensibleDataObject
Remarks
Use online tool for testing regular expressions: http://regexhero.net/tester/
Constructors
RegexExpression()
Declaration
public RegexExpression()
Fields
ElementName
Name of the root element when object is serialized to XML.
Declaration
public const string ElementName = "REGEX"
Field Value
Type | Description |
---|---|
System.String |
Properties
CultureInvariant
Gets or sets the flag indicating that cultural differences in language are ignored.
Declaration
public bool CultureInvariant { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ExplicitCapture
Gets or sets the flag indicating that the only valid captures are explicitly named or numbered groups of the form (?<name>…). This allows unnamed parentheses to act as noncapturing groups without the syntactic clumsiness of the expression (?:...).
Declaration
public bool ExplicitCapture { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IgnoreCase
Gets or sets the flag indicating case-insensitive matching.
Declaration
public bool IgnoreCase { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IgnoreWhitespace
Gets or sets the flag that eliminates unescaped white space from the pattern and enables comments marked with #. However, the flag value does not affect or eliminate white space in character classes.
Declaration
public bool IgnoreWhitespace { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Multiline
Gets or sets the flag indicating multiline mode. Changes the meaning of ^ and $ so they match at the beginning and end, respectively, of any line, and not just the beginning and end of the entire string. Leaving this property to False changes the meaning of the dot (.) so it matches every character (instead of every character except \n).
Declaration
public bool Multiline { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Pattern
Gets or sets the regular expression pattern to be matched.
Declaration
public string Pattern { get; set; }
Property Value
Type | Description |
---|---|
System.String |
RightToLeft
Gets or sets the flag indicating that the search will be from right to left instead of from left to right.
Declaration
public bool RightToLeft { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Equals(AuthorizationExpressionBase)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(AuthorizationExpressionBase other)
Parameters
Type | Name | Description |
---|---|---|
AuthorizationExpressionBase | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
System.Boolean | True if the specified object is equal to the current object; otherwise, false. |
Overrides
Equals(Object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
System.Boolean | True if the specified object is equal to the current object; otherwise, false. |
Overrides
Evaluate(AuthorizationExpressionContext)
Returns True, if provided identity is authorized to proceed with the service call.
Declaration
public override bool Evaluate(AuthorizationExpressionContext context)
Parameters
Type | Name | Description |
---|---|---|
AuthorizationExpressionContext | context | Provides the message evaluation context. |
Returns
Type | Description |
---|---|
System.Boolean | True, if provided identity is authorized to proceed with the service call. False, otherwise. |
Overrides
GetHashCode()
Returns hash code for the value of this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | Hash code for the value of this instance. |
Overrides
ToString()
Returns string representation of the object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | String representing the object's content. |
Overrides
Validate()
Evaluates the state of the object.
Declaration
public override bool Validate()
Returns
Type | Description |
---|---|
System.Boolean | True if state is valid; otherwise, false. |