Show / Hide Table of Contents

Class ManifestValueInfo

An immutable model which provides information about the configuration of a value to be validated.

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

This type roughly corresponds to a ManifestItem and its derived types. The key difference between that and this 'info' class is that this type is immutable and presents a read-only API.

Constructors

| Improve this Doc View Source

ManifestValueInfo(ManifestItem)

Initialises an instance of ManifestValueInfo. This is essentially a copy-constructor for a ManifestItem.

Declaration
public ManifestValueInfo(ManifestItem manifestValue)
Parameters
Type Name Description
ManifestItem manifestValue

The manifest value from which to create this instance.

Exceptions
Type Condition
System.ArgumentNullException

If manifestValue is null.

Properties

| Improve this Doc View Source

AccessorExceptionBehaviour

Gets or sets an optional value which indicates the desired behaviour should the value-accessor raise an exception.

Declaration
public ValueAccessExceptionBehaviour? AccessorExceptionBehaviour { get; }
Property Value
Type Description
System.Nullable<ValueAccessExceptionBehaviour>
Remarks

This option will override the behaviour specified at AccessorExceptionBehaviour for the current manifest value, if this property is set to any non-null value.

If this property is set to null then the behaviour at AccessorExceptionBehaviour will be used.

See Also
AccessorExceptionBehaviour
| Improve this Doc View Source

Children

Gets a collection of the immediate descendents of the current manifest value.

Declaration
public IReadOnlyCollection<ManifestValueInfo> Children { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyCollection<ManifestValueInfo>
| Improve this Doc View Source

CollectionItemValue

Gets an optional value object which indicates how items within a collection are to be validated.

Declaration
public ManifestValueInfo CollectionItemValue { get; }
Property Value
Type Description
ManifestValueInfo
Remarks

If the value representd by the current instance is a collection/enumerable of items then these items may be validated individually. In this scenario, the ValidatedType must be a type that implements System.Collections.Generic.IEnumerable<T> for at least one generic type.

If the current value does not represent a collection of items to be validated individually then this property will be null.

| Improve this Doc View Source

MemberName

Where the current value represents a member access invocation (such as a property getter), this property gets the name of that member.

Declaration
public string MemberName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ValidatedType

Gets the type of the object which the current manifest value describes.

Declaration
public Type ValidatedType { get; }
Property Value
Type Description
System.Type

Methods

| Improve this Doc View Source

GetOriginalManifestValue()

Gets a reference to the original manifest value.

Declaration
public ManifestItem GetOriginalManifestValue()
Returns
Type Description
ManifestItem

The original manifest value from which this instance was created.

Remarks

Be very careful not to mutate/alter any state of this object when using this method. The returned object is mutable, but must not be changed.

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