Class InstrumentingValidaionRuleResultWithMessageDecorator
Decorator for IGetsValidationRuleResultWithMessage which adds instrumentation data to the result.
Inheritance
System.Object
InstrumentingValidaionRuleResultWithMessageDecorator
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.Messages
Assembly: CSF.Validation.dll
Syntax
public class InstrumentingValidaionRuleResultWithMessageDecorator : IGetsValidationRuleResultWithMessage
Constructors
| Improve this Doc View SourceInstrumentingValidaionRuleResultWithMessageDecorator(IGetsValidationRuleResultWithMessage)
Declaration
public InstrumentingValidaionRuleResultWithMessageDecorator(IGetsValidationRuleResultWithMessage wrapped)
Parameters
Type | Name | Description |
---|---|---|
IGetsValidationRuleResultWithMessage | wrapped |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
Methods
| Improve this Doc View SourceGetRuleResultWithMessageAsync(ValidationRuleResult, CancellationToken)
Gets rule result based upon a specified result, possibly with an added feedback message.
Declaration
public async 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.