Interface ICommandHandlerArgumentResolver
- Namespace
- Cratis.Arc.Commands
- Assembly
- Cratis.Arc.Core.dll
Defines a system that resolves the arguments for a command handler, including any values produced by the
command's Provide method, and surfaces any short-circuiting result it produces.
public interface ICommandHandlerArgumentResolver
- Extension Methods
Methods
Resolve(ICommandHandler, CommandContext, IServiceProvider, ValidationResultSeverity?)
Resolves the arguments for the given command handler.
ValueTask<CommandHandlerArgumentResolution> Resolve(ICommandHandler handler, CommandContext context, IServiceProvider serviceProvider, ValidationResultSeverity? allowedSeverity)
Parameters
handlerICommandHandlerThe ICommandHandler to resolve arguments for.
contextCommandContextThe CommandContext for the command being handled.
serviceProviderIServiceProviderThe IServiceProvider used to resolve arguments not produced by
Provide.allowedSeverityValidationResultSeverity?The maximum validation result severity to allow before short-circuiting.
Returns
- ValueTask<CommandHandlerArgumentResolution>
A CommandHandlerArgumentResolution carrying the resolved arguments, or a short-circuiting CommandResult when the command's
Providemethod produced a blocking control value.