Class ValidationException
Represents an exception that is thrown when a validation check fails.
Inheritance
System.Object
ValidationException
Namespace: MediatorForge.CQRS.Exceptions
Assembly: MediatorForge.dll
Syntax
public class ValidationException : Exception
Constructors
| Improve this Doc View SourceValidationException(IEnumerable<ValidationError>)
Initializes a new instance of the ValidationException class with a specified collection of validation errors.
Declaration
public ValidationException(IEnumerable<ValidationError> errors)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ValidationError> | errors | The collection of validation errors. |
ValidationException(String, IEnumerable<ValidationError>)
Initializes a new instance of the ValidationException class with a specified error message and a collection of validation errors.
Declaration
public ValidationException(string message, IEnumerable<ValidationError> errors)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The error message that explains the reason for the exception. |
IEnumerable<ValidationError> | errors | The collection of validation errors. |
Properties
| Improve this Doc View SourceErrors
Gets the collection of validation errors.
Declaration
public IEnumerable<ValidationError> Errors { get; }
Property Value
Type | Description |
---|---|
IEnumerable<ValidationError> |
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. |