Interface ICommandHandler
- Namespace
- Cratis.Applications.Commands
- Assembly
- Cratis.Applications.dll
Defines a handler for processing command response values.
public interface ICommandHandler
Properties
CommandType
Gets the type of command the handler can handle.
Type CommandType { get; }
Property Value
Dependencies
Gets the dependencies required by the handler.
IEnumerable<Type> Dependencies { get; }
Property Value
Location
Gets the location the command is at.
IEnumerable<string> Location { get; }
Property Value
Remarks
This is used to determine which handler should handle a given command based on its location.
Methods
Handle(CommandContext)
Handles the given command.
Task<object?> Handle(CommandContext commandContext)
Parameters
commandContext
CommandContextThe context for the command being handled.