Class ValidatorBuilderFactory
A factory service which gets instances of IConfiguresValidator<TValidated>.
Inheritance
System.Object
ValidatorBuilderFactory
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.ValidatorBuilding
Assembly: CSF.Validation.dll
Syntax
public class ValidatorBuilderFactory : IGetsValidatorBuilder
Constructors
| Improve this Doc View SourceValidatorBuilderFactory(Func<IGetsValidatorBuilderContext>, Func<IGetsRuleBuilder>, Func<IGetsValueAccessorBuilder>, Func<IGetsValidatorBuilderContextFromBuilder>)
Initialises a new instance of ValidatorBuilderFactory.
Declaration
public ValidatorBuilderFactory(Func<IGetsValidatorBuilderContext> ruleContextFactory, Func<IGetsRuleBuilder> ruleBuilderFactory, Func<IGetsValueAccessorBuilder> valueBuilderFactory, Func<IGetsValidatorBuilderContextFromBuilder> validatorManifestFactory)
Parameters
Type | Name | Description |
---|---|---|
System.Func<IGetsValidatorBuilderContext> | ruleContextFactory | A factory delegate for a rule context factory. |
System.Func<IGetsRuleBuilder> | ruleBuilderFactory | A factory delegate for a rule builder factory. |
System.Func<IGetsValueAccessorBuilder> | valueBuilderFactory | A factory delegate for a value-accessor builder factory. |
System.Func<IGetsValidatorBuilderContextFromBuilder> | validatorManifestFactory | A factory delegate for a validation manifest factory. |
Methods
| Improve this Doc View SourceGetValidatorBuilder<TValidated>(ValidatorBuilderContext)
Gets the validator builder object, optionally for a specified validator builder context.
Declaration
public IConfiguresValidator<TValidated> GetValidatorBuilder<TValidated>(ValidatorBuilderContext context = null)
Parameters
Type | Name | Description |
---|---|---|
ValidatorBuilderContext | context | An optional validator builder context; if null then a new/empty context will be created. |
Returns
Type | Description |
---|---|
IConfiguresValidator<TValidated> | A validator builder. |
Type Parameters
Name | Description |
---|---|
TValidated | The type of object to be validated. |