Show / Hide Table of Contents

Class SingleRuleValidationResultMessageEnricher

Default implementation of IGetsValidationRuleResultWithMessage.

Inheritance
System.Object
SingleRuleValidationResultMessageEnricher
Implements
IGetsValidationRuleResultWithMessage
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.Messages
Assembly: CSF.Validation.dll
Syntax
public class SingleRuleValidationResultMessageEnricher : IGetsValidationRuleResultWithMessage

Constructors

| Improve this Doc View Source

SingleRuleValidationResultMessageEnricher(IGetsFailureMessageProvider)

Initialises a new instance of SingleRuleValidationResultMessageEnricher.

Declaration
public SingleRuleValidationResultMessageEnricher(IGetsFailureMessageProvider messageProviderFactory)
Parameters
Type Name Description
IGetsFailureMessageProvider messageProviderFactory

A factory for message providers.

Exceptions
Type Condition
System.ArgumentNullException

If messageProviderFactory is null.

Methods

| Improve this Doc View Source

GetRuleResultWithMessageAsync(ValidationRuleResult, CancellationToken)

Gets rule result based upon a specified result, possibly with an added feedback message.

Declaration
public ValueTask<ValidationRuleResult> GetRuleResultWithMessageAsync(ValidationRuleResult ruleResult, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
ValidationRuleResult ruleResult

The rule result for which to enrich with a message.

System.Threading.CancellationToken cancellationToken

An optional cancellation token.

Returns
Type Description
System.Threading.Tasks.ValueTask<ValidationRuleResult>

A task containing a validation rule result.

Remarks

This method might return a task with a reference to the same result that was specified as the ruleResult parameter, or it might be a copy of that result with an added feedback message.

Implements

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