Show / Hide Table of Contents

Class ValidatorFactoryExtensions

Extensionm methods for IGetsValidator.

Inheritance
System.Object
ValidatorFactoryExtensions
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.Abstractions.dll
Syntax
public static class ValidatorFactoryExtensions

Methods

| Improve this Doc View Source

GetValidator<TValidated>(IGetsValidator, ValidationManifest)

Gets a validator instance for a specified generic type, using a specified validation manifest. The manifest must describe a validator which is able to validate the object type TValidated.

Declaration
public static IValidator<TValidated> GetValidator<TValidated>(this IGetsValidator factory, ValidationManifest manifest)
Parameters
Type Name Description
IGetsValidator factory

The validator factory.

ValidationManifest manifest

The validation manifest.

Returns
Type Description
IValidator<TValidated>

A strongly-typed validator implementation.

Type Parameters
Name Description
TValidated

The type of object to validate.

Exceptions
Type Condition
System.ArgumentNullException

If either factory or manifest are null.

System.ArgumentException

If manifest does not describe a validator for TValidated.

| Improve this Doc View Source

GetValidator<TValidated>(IGetsValidator, Value)

Gets a validator instance for a specified generic type, using a specified manifest model. The model must describe a validator which is able to validate the object type TValidated.

Declaration
public static IValidator<TValidated> GetValidator<TValidated>(this IGetsValidator factory, Value manifestModel)
Parameters
Type Name Description
IGetsValidator factory

The validator factory.

Value manifestModel

The validation manifest model.

Returns
Type Description
IValidator<TValidated>

A strongly-typed validator implementation.

Type Parameters
Name Description
TValidated

The type of object to validate.

Exceptions
Type Condition
System.ArgumentNullException

If either factory or manifestModel are null.

| Improve this Doc View Source

GetValidator<TValidated>(IGetsValidator, Type)

Gets a validator instance for a specified generic type, using a specified builder type. The builder type must implement IBuildsValidator<TValidated> for the generic type TValidated.

Declaration
public static IValidator<TValidated> GetValidator<TValidated>(this IGetsValidator factory, Type builderType)
Parameters
Type Name Description
IGetsValidator factory

The validator factory.

System.Type builderType

A type indicating the type of validator-builder service to use.

Returns
Type Description
IValidator<TValidated>

A strongly-typed validator implementation.

Type Parameters
Name Description
TValidated

The type of object to validate.

Exceptions
Type Condition
System.ArgumentNullException

If either factory or builderType are null.

System.ArgumentException

If builderType is not of a type appropriate to validate TValidated.

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