Class ValidatorFactoryExtensions
Extensionm methods for IGetsValidator.
Inheritance
Inherited Members
Namespace: CSF.Validation
Assembly: CSF.Validation.Abstractions.dll
Syntax
public static class ValidatorFactoryExtensionsMethods
| Improve this Doc View SourceGetValidator<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  | 
| System.ArgumentException | If  | 
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  | 
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  | 
| System.ArgumentException | If  |