Show / Hide Table of Contents

Class ResultsForErroredValuesExecutionDecorator

A decorator for IExecutesAllRules which adds additional results to the output for any validated values which raised an error when they were retrieved.

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

This decorator is relevant when the ValueResponse for any of the ValidatedValue of any of the available rules is an instance of ErrorGetValueToBeValidatedResponse. These value responses represent values which were not successfully retrieved & threw an exception.

This class adds additional result items to the overall list of results, to indicate that these validated values caused errors.

This would only occur if the AccessorExceptionBehaviour is set to TreatAsError.

Constructors

| Improve this Doc View Source

ResultsForErroredValuesExecutionDecorator(IExecutesAllRules)

Initialises a new instance of ResultsForErroredValuesExecutionDecorator.

Declaration
public ResultsForErroredValuesExecutionDecorator(IExecutesAllRules wrapped)
Parameters
Type Name Description
IExecutesAllRules wrapped

The wrapped rule executor.

Exceptions
Type Condition
System.ArgumentNullException

If wrapped 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