Show / Hide Table of Contents

Class ResultsForRulesWithFailedDependenciesExecutionDecorator

A decorator for the interface IExecutesAllRules which populates the rule results for rules which have not been executed because one or more of their dependency rules did not result in a Passed outcome.

Inheritance
System.Object
ResultsForRulesWithFailedDependenciesExecutionDecorator
Implements
IExecutesAllRules
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 ResultsForRulesWithFailedDependenciesExecutionDecorator : IExecutesAllRules
Remarks

Rules which have failed dependencies are not executed, because their dependencies failed. That means that they won't automatically have results created by the validation process. This decorator creates results for all of those rules which have been skipped due to failed dependencies. All of those results will have the outcome DependencyFailed.

Constructors

| Improve this Doc View Source

ResultsForRulesWithFailedDependenciesExecutionDecorator(IExecutesAllRules, IGetsRuleContext)

Initialises a new instance of ResultsForRulesWithFailedDependenciesExecutionDecorator.

Declaration
public ResultsForRulesWithFailedDependenciesExecutionDecorator(IExecutesAllRules wrapped, IGetsRuleContext contextFactory)
Parameters
Type Name Description
IExecutesAllRules wrapped

The wrapped executor instance.

IGetsRuleContext contextFactory

A rule context factory.

Exceptions
Type Condition
System.ArgumentNullException

If any parameter is null.

Methods

| Improve this Doc View Source

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

Implements

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