Class AuthorizationResult
Represents the result of an authorization operation.
Inheritance
System.Object
AuthorizationResult
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: MediatorForge.Utilities
Assembly: MediatorForge.dll
Syntax
public class AuthorizationResult
Constructors
| Improve this Doc View SourceAuthorizationResult(IEnumerable<AuthorizationError>)
Initializes a new instance of the AuthorizationResult class with a collection of authorization errors.
Declaration
public AuthorizationResult(IEnumerable<AuthorizationError> errors)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<AuthorizationError> | errors | The collection of authorization errors. |
Properties
| Improve this Doc View SourceErrors
Gets the collection of authorization errors.
Declaration
public IEnumerable<AuthorizationError> Errors { get; }
Property Value
Type | Description |
---|---|
IEnumerable<AuthorizationError> |
IsAuthorized
Gets a value indicating whether the authorization was successful.
Declaration
public bool IsAuthorized { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Success
Gets an AuthorizationResult that represents a successful authorization.
Declaration
public static AuthorizationResult Success { get; }
Property Value
Type | Description |
---|---|
AuthorizationResult |
Methods
| Improve this Doc View SourceFailure(IEnumerable<AuthorizationError>)
Creates an AuthorizationResult that represents a failed authorization with the specified errors.
Declaration
public static AuthorizationResult Failure(IEnumerable<AuthorizationError> errors)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<AuthorizationError> | errors | The collection of authorization errors. |
Returns
Type | Description |
---|---|
AuthorizationResult | An AuthorizationResult that represents a failed authorization. |