Show / Hide Table of Contents

Class ExceptionThrowingValidatorWrapper

A service which wraps instances of validators with exception-throwing behaviour.

Inheritance
System.Object
ExceptionThrowingValidatorWrapper
Implements
IWrapsValidatorWithExceptionBehaviour
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 ExceptionThrowingValidatorWrapper : IWrapsValidatorWithExceptionBehaviour

Constructors

| Improve this Doc View Source

ExceptionThrowingValidatorWrapper(IGetsResolvedValidationOptions)

Initialises a new instance of ExceptionThrowingValidatorWrapper.

Declaration
public ExceptionThrowingValidatorWrapper(IGetsResolvedValidationOptions optionsResolver)
Parameters
Type Name Description
IGetsResolvedValidationOptions optionsResolver

An options resolver.

Exceptions
Type Condition
System.ArgumentNullException

If optionsResolver is null.

Methods

| Improve this Doc View Source

WrapValidator(IValidator)

Wraps a non-generic validator with the appropriate behaviour.

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

The validator instance to wrap.

Returns
Type Description
IValidator

A validator, with added exception-throwing behaviour.

| Improve this Doc View Source

WrapValidator<TValidated>(IValidator<TValidated>)

Wraps a generic validator with the appropriate behaviour.

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

The validator instance to wrap.

Returns
Type Description
IValidator<TValidated>

A validator, with added exception-throwing behaviour.

Type Parameters
Name Description
TValidated

The validated type.

Implements

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