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

handler ICommandHandler

The ICommandHandler to resolve arguments for.

context CommandContext

The CommandContext for the command being handled.

serviceProvider IServiceProvider

The IServiceProvider used to resolve arguments not produced by Provide.

allowedSeverity ValidationResultSeverity?

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 Provide method produced a blocking control value.