Interface IFormComponentCommandInvoker
Invoker of form component commands.
public interface IFormComponentCommandInvoker
- Extension Methods
Methods
Invoke(ICollection<IFormComponent>, IFormComponentCommandInvocationModel, CancellationToken)
Invokes component command described by the commandInvocationModel
parameter on the component from formComponents
matching the name.
Task<object> Invoke(ICollection<IFormComponent> formComponents, IFormComponentCommandInvocationModel commandInvocationModel, CancellationToken cancellationToken)
Parameters
formComponents
ICollection<IFormComponent>Collection of components the command relates to.
commandInvocationModel
IFormComponentCommandInvocationModelArguments describing the component and command to be invoked.
cancellationToken
CancellationTokenThe cancellation instruction.
Returns
- Task<object>
Returns the result of the component command. Returns null if the command method's return type is void.
Exceptions
- ArgumentNullException
Thrown when
formComponents
orcommandInvocationModel
is null.- InvalidOperationException
Thrown when the command name identifies a component which is not among
formComponents
or when the command identified bycommandInvocationModel
is not available within respective component or when the invocation fails.