Class SerialRuleExecutor
An implementation of IExecutesAllRules which executes each rule in serial with no parallelisation.
Inheritance
System.Object
SerialRuleExecutor
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CSF.Validation.RuleExecution
Assembly: CSF.Validation.dll
Syntax
public class SerialRuleExecutor : IExecutesAllRules
Constructors
| Improve this Doc View SourceSerialRuleExecutor(IExeucutesSingleRule)
Initialises a new instance of SerialRuleExecutor.
Declaration
public SerialRuleExecutor(IExeucutesSingleRule ruleExecutor)
Parameters
| Type | Name | Description |
|---|---|---|
| IExeucutesSingleRule | ruleExecutor | A service which executes rules. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | If |
Methods
| Improve this Doc View SourceExecuteAllRulesAsync(IRuleExecutionContext, CancellationToken)
Execute all of the specified validation rules and return their results.
Declaration
public async Task<IReadOnlyCollection<ValidationRuleResult>> ExecuteAllRulesAsync(IRuleExecutionContext executionContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| IRuleExecutionContext | executionContext | The validation rule execution context. |
| System.Threading.CancellationToken | cancellationToken | An optional cancellation token. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<ValidationRuleResult>> | A task containing a collection of the results from the executed validation rules. |