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
formComponentsICollection<IFormComponent>Collection of components the command relates to.
commandInvocationModelIFormComponentCommandInvocationModelArguments describing the component and command to be invoked.
cancellationTokenCancellationTokenThe 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
formComponentsorcommandInvocationModelis null.- InvalidOperationException
Thrown when the command name identifies a component which is not among
formComponentsor when the command identified bycommandInvocationModelis not available within respective component or when the invocation fails.