Class AuthorizationExpressionBase
Represents a base class for all expressions participating in an authorization rule.
Inheritance
Inherited Members
Namespace: Nevatech.Vsb.Repository.Security
Assembly: Nevatech.Vsb.Repository.dll
Syntax
[KnownType(typeof(AndExpression))]
[KnownType(typeof(OrExpression))]
[KnownType(typeof(NotExpression))]
[KnownType(typeof(ClaimExpression))]
[KnownType(typeof(DateTimeExpression))]
[KnownType(typeof(UserNameExpression))]
[KnownType(typeof(WindowsUserExpression))]
[KnownType(typeof(WindowsGroupExpression))]
[KnownType(typeof(X509CertificateExpression))]
[KnownType(typeof(XPathExpression))]
[KnownType(typeof(MatchAllExpression))]
[KnownType(typeof(CustomExpression))]
[KnownType(typeof(TransactionCountExpression))]
[KnownType(typeof(UriExpression))]
[KnownType(typeof(HttpHeaderExpression))]
[KnownType(typeof(HttpMethodExpression))]
[KnownType(typeof(HttpStatusExpression))]
[KnownType(typeof(CallerAddressExpression))]
[KnownType(typeof(RegexExpression))]
[KnownType(typeof(OperationExpression))]
[KnownType(typeof(ContextPropertyExpression))]
[KnownType(typeof(JsonPointerExpression))]
[KnownType(typeof(JsonPathExpression))]
[DataContract(Namespace = "http://schemas.nevatech.com/sentinet/2011/02")]
public abstract class AuthorizationExpressionBase : IValidator, IEquatable<AuthorizationExpressionBase>, IExtensibleDataObject
Constructors
AuthorizationExpressionBase()
Declaration
protected AuthorizationExpressionBase()
Properties
ErrorMessage
Gets the message indicating the errors found during validation process.
Declaration
public string ErrorMessage { get; protected set; }
Property Value
| Type | Description |
|---|---|
| string |
ExtensionData
Gets or sets ExtensionDataObject that enables serialization round trips.
Declaration
public ExtensionDataObject ExtensionData { get; set; }
Property Value
| Type | Description |
|---|---|
| ExtensionDataObject |
Title
Gets or sets the friendly name of the expression. This value is used for documentation and display purposes only.
Declaration
[DataMember(EmitDefaultValue = false)]
public string Title { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Equals(AuthorizationExpressionBase)
Determines whether the specified object is equal to the current object.
Declaration
public virtual bool Equals(AuthorizationExpressionBase other)
Parameters
| Type | Name | Description |
|---|---|---|
| AuthorizationExpressionBase | other | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| bool | True if the specified object is equal to the current object; otherwise, false. |
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| bool | True if the specified object is equal to the current object; otherwise, false. |
Overrides
Evaluate(AuthorizationExpressionContext)
When implemented, returns True, if provided identity is authorized to proceed with the service call.
Declaration
public abstract bool Evaluate(AuthorizationExpressionContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| AuthorizationExpressionContext | context | Provides the message evaluation context. |
Returns
| Type | Description |
|---|---|
| bool | True, if provided identity is authorized to proceed with the service call. False, otherwise. |
Find<T>()
Finds all expressions of the given type in the expression's graph.
Declaration
public Collection<T> Find<T>() where T : AuthorizationExpressionBase
Returns
| Type | Description |
|---|---|
| Collection<T> | Collection of elements of the given type found in the expression's graph. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of the element to be found. |
GetHashCode()
Returns hash code for the value of this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | Hash code for the value of this instance. |
Overrides
ToString(string, ICollection<AuthorizationExpressionBase>)
Returns aggregated string representation of an expression collection.
Declaration
protected static string ToString(string message, ICollection<AuthorizationExpressionBase> expressions)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Format string of the header message. |
| ICollection<AuthorizationExpressionBase> | expressions | Collection of expressions to be printed out. |
Returns
| Type | Description |
|---|---|
| string | Aggregated string representation of an expression collection. |
Validate()
Evaluates the state of the object. Always returns True.
Declaration
public virtual bool Validate()
Returns
| Type | Description |
|---|---|
| bool | True if state is valid; otherwise, false. |