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
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
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 |
---|---|
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 |
---|---|---|
Object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
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 |
---|---|
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 |
---|---|
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 |
---|---|
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 |
---|---|---|
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 |
---|---|
Boolean | True if state is valid; otherwise, false. |