Class ValidatedValueFactory
A service which gets a ValidatedValue from a ManifestItem and an object to be validated.
Inheritance
Implements
Inherited Members
Namespace: CSF.Validation.RuleExecution
Assembly: CSF.Validation.dll
Syntax
public class ValidatedValueFactory : IGetsValidatedValue
Remarks
This prepares the validation rules to be executed and extracts all child values from the object to be validated, traversing its object graph according to the validation manifest.
Constructors
| Improve this Doc View SourceValidatedValueFactory(IGetsValidatedValueFromBasis, IGetsValueToBeValidated, IGetsEnumerableItemsToBeValidated)
Initialises a new instance of ValidatedValueFactory.
Declaration
public ValidatedValueFactory(IGetsValidatedValueFromBasis valueFromBasisFactory, IGetsValueToBeValidated valueProvider, IGetsEnumerableItemsToBeValidated enumerableProvider)
Parameters
Type | Name | Description |
---|---|---|
IGetsValidatedValueFromBasis | valueFromBasisFactory | A factory that gets the logic from a ValidatedValueBasis. |
IGetsValueToBeValidated | valueProvider | A service to get the value to be validated. |
IGetsEnumerableItemsToBeValidated | enumerableProvider | A service that gets the items of an enumerable object. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If any parameter value is null. |
Methods
| Improve this Doc View SourceGetValidatedValue(ManifestItem, Object, ResolvedValidationOptions)
Gets the validated value from the specified manifest value and object to be validated.
Declaration
public ValidatedValue GetValidatedValue(ManifestItem manifestValue, object objectToBeValidated, ResolvedValidationOptions options)
Parameters
Type | Name | Description |
---|---|---|
ManifestItem | manifestValue | The manifest value. |
System.Object | objectToBeValidated | The object to be validated. |
ResolvedValidationOptions | options | The validation options. |
Returns
Type | Description |
---|---|
ValidatedValue | A validated value, including a hierarchy of descendent values and the rules which may be executed upon those values. |