Class AuthorizationException
Represents an exception that is thrown when an authorization check fails.
Inheritance
System.Object
AuthorizationException
Namespace: MediatorForge.CQRS.Exceptions
Assembly: MediatorForge.dll
Syntax
public class AuthorizationException : Exception
Constructors
| Improve this Doc View SourceAuthorizationException(IEnumerable<AuthorizationError>)
Initializes a new instance of the AuthorizationException class with a specified error message and a collection of authorization errors.
Declaration
public AuthorizationException(IEnumerable<AuthorizationError> errors)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<AuthorizationError> | errors | The collection of authorization errors. |
AuthorizationException(String, IEnumerable<AuthorizationError>)
Initializes a new instance of the AuthorizationException class with a specified error message and a collection of authorization errors.
Declaration
public AuthorizationException(string message, IEnumerable<AuthorizationError> errors)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The error message that explains the reason for the exception. |
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> |
Methods
| Improve this Doc View SourceToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents the current object. |