Show / Hide Table of Contents

Class ValidatedValue

A model which represents a value which is being validated by the validator.

Inheritance
System.Object
ValidatedValue
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.RuleExecution
Assembly: CSF.Validation.Abstractions.dll
Syntax
public class ValidatedValue

Properties

| Improve this Doc View Source

ChildValues

Gets a collection of the child values, which treat the current instance as their parent.

Declaration
public IList<ValidatedValue> ChildValues { get; }
Property Value
Type Description
System.Collections.Generic.IList<ValidatedValue>
| Improve this Doc View Source

CollectionItemOrder

Gets or sets a numeric item order, indicating the order in which this value was retrieved from a collection.

Declaration
public long? CollectionItemOrder { get; set; }
Property Value
Type Description
System.Nullable<System.Int64>
Remarks

This is not neccesarily a collection index, because a collection of values to be validated might only be System.Collections.Generic.IEnumerable<T> and not (for example) System.Collections.Generic.IList<T>. Thus, the order in which values are retrieved might not be meaningful and might not even be stable. For informational purposes, this value is still retrieved and made available by this property.

If the current validated value does not represent an item from a collection then this property will contain null.

| Improve this Doc View Source

CollectionItems

Where this validated value represents a collection of values, and there is a separate validated value representing the items of that collection, this property should contain a collection of the values which represent the items of that collection.

Declaration
public IList<ValidatedValue> CollectionItems { get; set; }
Property Value
Type Description
System.Collections.Generic.IList<ValidatedValue>
| Improve this Doc View Source

ManifestValue

Gets or sets the manifest value to which the current instance relates.

Declaration
public ManifestItem ManifestValue { get; set; }
Property Value
Type Description
ManifestItem
| Improve this Doc View Source

ParentValue

Gets or sets a parent value, where applicable.

Declaration
public ValidatedValue ParentValue { get; set; }
Property Value
Type Description
ValidatedValue
| Improve this Doc View Source

Rules

Gets a collection of the rules which should be executed upon the current value.

Declaration
public IList<ExecutableRule> Rules { get; set; }
Property Value
Type Description
System.Collections.Generic.IList<ExecutableRule>
| Improve this Doc View Source

ValueIdentity

Gets or sets the identity of the value to be validated.

Declaration
public object ValueIdentity { get; set; }
Property Value
Type Description
System.Object
| Improve this Doc View Source

ValueResponse

Gets or sets a response object which may expose an "actual value" of the validated value.

Declaration
public GetValueToBeValidatedResponse ValueResponse { get; set; }
Property Value
Type Description
GetValueToBeValidatedResponse
See Also
GetActualValue()

Methods

| Improve this Doc View Source

GetActualValue()

Gets the 'actual value' from the ValueResponse. If that is not an instance of SuccessfulGetValueToBeValidatedResponse then this method will return null.

Declaration
public object GetActualValue()
Returns
Type Description
System.Object

Either an actual value or a null reference.

| Improve this Doc View Source

IsMatch(ManifestItem, GetValueToBeValidatedResponse)

Gets a value that indicates whether the current instance matches the specified manifest item and value response.

Declaration
public bool IsMatch(ManifestItem item, GetValueToBeValidatedResponse valueResponse)
Parameters
Type Name Description
ManifestItem item

A manifest item

GetValueToBeValidatedResponse valueResponse

A value response

Returns
Type Description
System.Boolean

true if the current instance matches the item and value response; false otherwise.

Remarks

This method is used only to detect circular references in the validated object model. Circular references are not validated, because they would lead to an endless loop.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX