Show / Hide Table of Contents

Class SingleRuleExecutor

A service that executes a single validation rule and gets its result.

Inheritance
System.Object
SingleRuleExecutor
Implements
IExeucutesSingleRule
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 SingleRuleExecutor : IExeucutesSingleRule

Constructors

| Improve this Doc View Source

SingleRuleExecutor(IGetsRuleContext)

Initialises a new instance of SingleRuleExecutor.

Declaration
public SingleRuleExecutor(IGetsRuleContext contextFactory)
Parameters
Type Name Description
IGetsRuleContext contextFactory

A factory for rule contexts.

Exceptions
Type Condition
System.ArgumentNullException

If contextFactory is null.

Methods

| Improve this Doc View Source

ExecuteRuleAsync(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.

Implements

IExeucutesSingleRule
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX