Class CommandResponseValueHandlers
- Namespace
- Cratis.Applications.Commands
- Assembly
- Cratis.Applications.dll
Represents an implementation of ICommandResponseValueHandlers.
[Singleton]
public class CommandResponseValueHandlers : ICommandResponseValueHandlers
- Inheritance
-
CommandResponseValueHandlers
- Implements
- Inherited Members
- Extension Methods
Constructors
CommandResponseValueHandlers(IInstancesOf<ICommandResponseValueHandler>)
Represents an implementation of ICommandResponseValueHandlers.
public CommandResponseValueHandlers(IInstancesOf<ICommandResponseValueHandler> handlers)
Parameters
handlersIInstancesOf<ICommandResponseValueHandler>The available ICommandResponseValueHandler.
Methods
CanHandle(CommandContext, object)
Determines whether any handler can handle the given value.
public bool CanHandle(CommandContext context, object value)
Parameters
contextCommandContextThe CommandContext for the command that produced the value.
valueobjectValue to evaluate.
Returns
- bool
True if any handler can handle the value, false otherwise.
Handle(CommandContext, object)
Handles the given value.
public Task<CommandResult> Handle(CommandContext context, object value)
Parameters
contextCommandContextThe CommandContext for the command that produced the value.
valueobjectValue to handle.
Returns
- Task<CommandResult>
CommandResult representing the result of handling the value.