Interface ICommandProvideInvoker
- Namespace
- Cratis.Arc.Commands
- Assembly
- Cratis.Arc.Core.dll
Defines a system that invokes the optional Provide method on a command and returns the values it produces.
public interface ICommandProvideInvoker
- Extension Methods
Methods
Invoke(CommandContext, IServiceProvider)
Invokes the Provide method on the command in the given CommandContext, if it has one.
ValueTask<IReadOnlyList<object>> Invoke(CommandContext context, IServiceProvider serviceProvider)
Parameters
contextCommandContextThe CommandContext for the command being handled.
serviceProviderIServiceProviderThe IServiceProvider used to resolve the
Providemethod's parameters.
Returns
- ValueTask<IReadOnlyList<object>>
The non-null values produced by the
Providemethod (a single value, or each element of a returned tuple), or an empty collection when the command has noProvidemethod.