Show / Hide Table of Contents

Class MessageSupportValidatorWrapper

A service which wraps a validator with functionality which adds message support.

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

Constructors

| Improve this Doc View Source

MessageSupportValidatorWrapper(IAddsFailureMessagesToResult, IGetsResolvedValidationOptions)

Initialises a new instance of MessageSupportValidatorWrapper.

Declaration
public MessageSupportValidatorWrapper(IAddsFailureMessagesToResult failureMessageEnricher, IGetsResolvedValidationOptions optionsResolver)
Parameters
Type Name Description
IAddsFailureMessagesToResult failureMessageEnricher

The failure message enriching service.

IGetsResolvedValidationOptions optionsResolver

An options resolving service.

Exceptions
Type Condition
System.ArgumentNullException

If failureMessageEnricher is null.

Methods

| Improve this Doc View Source

GetValidatorWithMessageSupport(IValidator)

Wraps a non-generic validator with message-enriching behaviour.

Declaration
public IValidator GetValidatorWithMessageSupport(IValidator validator)
Parameters
Type Name Description
IValidator validator

The validator instance to wrap.

Returns
Type Description
IValidator

The validator, with added message support.

| Improve this Doc View Source

GetValidatorWithMessageSupport<TValidated>(IValidator<TValidated>)

Wraps a generic validator with message-enriching behaviour.

Declaration
public IValidator<TValidated> GetValidatorWithMessageSupport<TValidated>(IValidator<TValidated> validator)
Parameters
Type Name Description
IValidator<TValidated> validator

The validator instance to wrap.

Returns
Type Description
IValidator<TValidated>

The validator, with added message support.

Type Parameters
Name Description
TValidated

The validated type.

Implements

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