Class RuleExecutorFactory
A factory service which creates instances of IExecutesAllRules based upon the specified validation options.
Inheritance
System.Object
RuleExecutorFactory
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 RuleExecutorFactory : IGetsRuleExecutor
Constructors
| Improve this Doc View SourceRuleExecutorFactory(IServiceProvider)
Initialises a new instance of RuleExecutorFactory.
Declaration
public RuleExecutorFactory(IServiceProvider resolver)
Parameters
Type | Name | Description |
---|---|---|
System.IServiceProvider | resolver | A service resolver. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
Methods
| Improve this Doc View SourceGetRuleExecutorAsync(ResolvedValidationOptions, CancellationToken)
Gets the rule-execution service using an async API.
Declaration
public Task<IExecutesAllRules> GetRuleExecutorAsync(ResolvedValidationOptions options, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
ResolvedValidationOptions | options | The validation options. |
System.Threading.CancellationToken | token | An optional cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IExecutesAllRules> | A task which contains the rule-execution service implementation. |