Class AuthorizationExpressionBase
Represents a base class for all expressions participating in an authorization rule.
Inheritance
Implements
Inherited Members
Namespace: Nevatech.Vsb.Repository.Security
Assembly: Nevatech.Vsb.Repository.dll
Syntax
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 |
---|---|
System.String |
ExtensionData
Gets or sets System.Runtime.Serialization.ExtensionDataObject that enables serialization round trips.
Declaration
public ExtensionDataObject ExtensionData { get; set; }
Property Value
Type | Description |
---|---|
System.Runtime.Serialization.ExtensionDataObject |
Title
Gets or sets the friendly name of the expression. This value is used for documentation and display purposes only.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.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 |
---|---|
System.Boolean | 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 |
---|---|---|
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)
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 |
---|---|
System.Boolean | 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 |
---|---|
System.Collections.ObjectModel.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 |
---|---|
System.Int32 | 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 |
---|---|---|
System.String | message | Format string of the header message. |
System.Collections.Generic.ICollection<AuthorizationExpressionBase> | expressions | Collection of expressions to be printed out. |
Returns
Type | Description |
---|---|
System.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 |
---|---|
System.Boolean | True if state is valid; otherwise, false. |