Class CommandHandlerBase<TCommand>
the base class from which all CommandHandler<TCommand> classes inherit from
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: FastEndpoints
Assembly: FastEndpoints.dll
Syntax
public abstract class CommandHandlerBase<TCommand>
Type Parameters
Name | Description |
---|---|
TCommand | the type of the command |
Properties
ValidationFailed
the base class from which all CommandHandler<TCommand> classes inherit from
Declaration
public bool ValidationFailed { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ValidationFailures
the base class from which all CommandHandler<TCommand> classes inherit from
Declaration
public List<ValidationFailure> ValidationFailures { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<FluentValidation.Results.ValidationFailure> |
Methods
AddError(Expression<Func<TCommand, Object>>, String, String, Severity)
the base class from which all CommandHandler<TCommand> classes inherit from
Declaration
public void AddError(Expression<Func<TCommand, object>> property, string errorMessage, string errorCode = null, Severity severity = Severity.Error)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression<System.Func<TCommand, System.Object>> | property | |
System.String | errorMessage | |
System.String | errorCode | |
FluentValidation.Severity | severity |
AddError(String, String, Severity)
the base class from which all CommandHandler<TCommand> classes inherit from
Declaration
public void AddError(string message, string errorCode = null, Severity severity = Severity.Error)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | |
System.String | errorCode | |
FluentValidation.Severity | severity |
ThrowError(Expression<Func<TCommand, Object>>, String)
the base class from which all CommandHandler<TCommand> classes inherit from
Declaration
public void ThrowError(Expression<Func<TCommand, object>> property, string errorMessage)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression<System.Func<TCommand, System.Object>> | property | |
System.String | errorMessage |
ThrowError(String)
the base class from which all CommandHandler<TCommand> classes inherit from
Declaration
public void ThrowError(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message |
ThrowIfAnyErrors()
the base class from which all CommandHandler<TCommand> classes inherit from
Declaration
public void ThrowIfAnyErrors()