Class ValueAccessorBuilderFactory
A factory service which gets instances of IConfiguresValueAccessor<TValidated, TValue>.
Inheritance
System.Object
ValueAccessorBuilderFactory
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 ValueAccessorBuilderFactory : IGetsValueAccessorBuilder
Constructors
| Improve this Doc View SourceValueAccessorBuilderFactory(Func<IGetsRuleBuilder>, Func<IGetsValidatorBuilderContextFromBuilder>, Func<IGetsValidatorBuilderContext>)
Initialises a new instance of ValueAccessorBuilderFactory.
Declaration
public ValueAccessorBuilderFactory(Func<IGetsRuleBuilder> ruleBuilderFactory, Func<IGetsValidatorBuilderContextFromBuilder> validatorManifestFactory, Func<IGetsValidatorBuilderContext> contextFactory)
Parameters
Type | Name | Description |
---|---|---|
System.Func<IGetsRuleBuilder> | ruleBuilderFactory | A function which gets a rule builder factory. |
System.Func<IGetsValidatorBuilderContextFromBuilder> | validatorManifestFactory | A function which gets a validator manifest factory. |
System.Func<IGetsValidatorBuilderContext> | contextFactory | A function which gets a validation context factory. |
Methods
| Improve this Doc View SourceGetValueAccessorBuilder<TValidated, TValue>(ValidatorBuilderContext, Action<IConfiguresValueAccessor<TValidated, TValue>>)
Gets a builder for validating a value of a validated object (typically retrieved via member access).
Declaration
public IConfiguresValueAccessor<TValidated, TValue> GetValueAccessorBuilder<TValidated, TValue>(ValidatorBuilderContext ValidatorBuilderContext, Action<IConfiguresValueAccessor<TValidated, TValue>> valueConfig)
Parameters
Type | Name | Description |
---|---|---|
ValidatorBuilderContext | ValidatorBuilderContext | Contextual information about how validation rules should be built. |
System.Action<IConfiguresValueAccessor<TValidated, TValue>> | valueConfig | An action which configures the value accessor-builder. |
Returns
Type | Description |
---|---|
IConfiguresValueAccessor<TValidated, TValue> | A builder for validating the derived value. |
Type Parameters
Name | Description |
---|---|
TValidated | The type of the primary object under validation. |
TValue | The type of the derived value to be validated. |