Class InstrumentingSingleRuleExecutorDecorator
Decorator for IExeucutesSingleRule which adds instrumentation data to the rule result if applicable.
Inheritance
System.Object
InstrumentingSingleRuleExecutorDecorator
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 InstrumentingSingleRuleExecutorDecorator : IExeucutesSingleRule
Constructors
| Improve this Doc View SourceInstrumentingSingleRuleExecutorDecorator(IExeucutesSingleRule)
Initialises a new instance of InstrumentingSingleRuleExecutorDecorator.
Declaration
public InstrumentingSingleRuleExecutorDecorator(IExeucutesSingleRule wrapped)
Parameters
Type | Name | Description |
---|---|---|
IExeucutesSingleRule | wrapped | The wrapped service |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
Methods
| Improve this Doc View SourceExecuteRuleAsync(ExecutableRule, CancellationToken)
Executes the validation rule and returns its result.
Declaration
public async ValueTask<ValidationRuleResult> ExecuteRuleAsync(ExecutableRule rule, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
ExecutableRule | rule | The rule to execute. |
System.Threading.CancellationToken | cancellationToken | An optional cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<ValidationRuleResult> | A task containing the rule's result. |