Class ValidatedValueBasis
A small model used as an intermediate state in order to get a ValidatedValue. It holds the information required in order to get the validated value at a point in the future.
Inheritance
Inherited Members
Namespace: CSF.Validation.RuleExecution
Assembly: CSF.Validation.dll
Syntax
public sealed class ValidatedValueBasis
Constructors
| Improve this Doc View SourceValidatedValueBasis(ManifestItem, GetValueToBeValidatedResponse, ValidatedValue, Nullable<Int64>)
Initialises a new instance of ValidatedValueBasis.
Declaration
public ValidatedValueBasis(ManifestItem manifestValue, GetValueToBeValidatedResponse actualValue, ValidatedValue parent, long? collectionOrder = null)
Parameters
Type | Name | Description |
---|---|---|
ManifestItem | manifestValue | The manifest value for this basis. |
GetValueToBeValidatedResponse | actualValue | The actual value for this basis. |
ValidatedValue | parent | An optional parent validated value for this basis. |
System.Nullable<System.Int64> | collectionOrder | An optional collection order for this basis. |
Properties
| Improve this Doc View SourceCollectionOrder
Gets an optional collection order.
Declaration
public long? CollectionOrder { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
ManifestValue
Gets the manifest value.
Declaration
public ManifestItem ManifestValue { get; }
Property Value
Type | Description |
---|---|
ManifestItem |
Parent
Gets an optional parent validated value.
Declaration
public ValidatedValue Parent { get; }
Property Value
Type | Description |
---|---|
ValidatedValue |
ValidatedValueResponse
Gets the actual value.
Declaration
public GetValueToBeValidatedResponse ValidatedValueResponse { get; }
Property Value
Type | Description |
---|---|
GetValueToBeValidatedResponse |
Methods
| Improve this Doc View SourceGetActualValue()
Gets the actual value from the ValidatedValueResponse, or null if the response is not a success.
Declaration
public object GetActualValue()
Returns
Type | Description |
---|---|
System.Object | Either the Value or a null reference if the response is not a success. |
GetChildManifestValues()
Gets a collection of the ManifestItem which should be considered as children of the current manifest value basis.
Declaration
public IEnumerable<ManifestItem> GetChildManifestValues()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ManifestItem> | A collection of manifest values. |
Remarks
This method considers not only the Children of ManifestValue but also the children of every value returned by CSF.Validation.RuleExecution.ValidatedValueBasis.GetPolymorphicTypes.
GetManifestRules()
Gets a collection of the ManifestRule which should be applied to the current manifest value basis.
Declaration
public IEnumerable<ManifestRule> GetManifestRules()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ManifestRule> | A collection of manifest rules. |
Remarks
This method considers not only the Rules of ManifestValue but also the rules of every value returned by CSF.Validation.RuleExecution.ValidatedValueBasis.GetPolymorphicTypes.
IsCircularReference()
Gets a value which indicates whether the current validated value basis represents a circular reference to a value which has already been converted to a ValidatedValue.
Declaration
public bool IsCircularReference()
Returns
Type | Description |
---|---|
System.Boolean | true if the current instance appears as a ValidatedValue amongst the chain of Parent validated values; false otherwise. |
ToString()
Gets a string representation of the current instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents this validated value basis. |