Interface IExecutesAllRules
An object which executes all of the validation rules using an async API and returns a collection of results.
Namespace: CSF.Validation.RuleExecution
Assembly: CSF.Validation.Abstractions.dll
Syntax
public interface IExecutesAllRules
Remarks
The IRule
As each rule completes, regardless of its outcome, the
Handle
This process may be repeated more than once, getting available rules, executing them and updating them
in the context. The process should stop when all available rules have been executed (and updated in the
context) and Get
Methods
| Improve this Doc View SourceExecuteAllRulesAsync(IRuleExecutionContext, CancellationToken)
Execute all of the specified validation rules and return their results.
Declaration
Task<IReadOnlyCollection<ValidationRuleResult>> ExecuteAllRulesAsync(IRuleExecutionContext executionContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IRule |
executionContext | The validation rule execution context. |
System. |
cancellationToken | An optional cancellation token. |
Returns
Type | Description |
---|---|
System. |
A task containing a collection of the results from the executed validation rules. |