Click or drag to resize

ClassContextT Class

A specialized validation context for validating objects of type T.
Inheritance Hierarchy
SystemObject
  Xploration.ValidationValidationContext
    Xploration.ValidationValidationContextT
      Xploration.ValidationClassContextT

Namespace:  Xploration.Validation
Assembly:  Xploration.Validation (in Xploration.Validation.dll) Version: 1.0.0-alpha1
Syntax
public class ClassContext<T> : ValidationContext<T>
where T : class

Type Parameters

T
The type of the old and new object state.

The ClassContextT type exposes the following members.

Constructors
  NameDescription
Protected methodClassContextT
Initializes a new instance of the ClassContextT class.
Public methodClassContextT(T)
Initializes a new instance of the ClassContextT class with an object that represents the new state.
Public methodClassContextT(T, T)
Initializes a new instance of the ClassContextT class with objects that represents the old and new state.
Top
Properties
  NameDescription
Public propertyAllResults
Gets a collection of all validation results that are registered in the chain of contexts.
(Inherited from ValidationContext.)
Public propertyIndex
Gets or sets the zero based index of an entity in a collection that the current context is related to. Returns -1 if an index is not applicable.
(Inherited from ValidationContext.)
Public propertyNewValue
Gets the new state of the entity.
(Inherited from ValidationContextT.)
Public propertyOldValue
Gets the old state of the entity.
(Inherited from ValidationContextT.)
Public propertyParent
Gets or sets the parent context of the current context.
(Inherited from ValidationContext.)
Public propertyResults
Gets a collection of validation results that are related to the current context.
(Inherited from ValidationContext.)
Public propertyTransition
Gets the transition between the old and new value.
(Inherited from ValidationContext.)
Public propertyUserState
Gets or sets an user defined state object.
(Inherited from ValidationContext.)
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRegisterResult(ValidationResult)
Registers a validation result to the chain of contexts.
(Inherited from ValidationContext.)
Public methodRegisterResult(IValidator, Boolean, Object)
Registers a validation result for the current context.
(Inherited from ValidationContext.)
Public methodToString
Returns a string that represents the current object.
(Overrides ValidationContextTToString.)
Top
Extension Methods
  NameDescription
Public Extension MethodCastErrorsE
Returns error entities of the context its validation results that are of type E.
(Defined by ValidationContextExtensions.)
Public Extension MethodGetChildResults
Gets a collection of validation results from child contexts.
(Defined by ValidationContextExtensions.)
Public Extension MethodGetRootContext
Searches for the root context starting with the current context.
(Defined by ValidationContextExtensions.)
Public Extension MethodHasFailures
Determines if the context contains validation failures.
(Defined by ValidationContextExtensions.)
Public Extension MethodIsChildOf
Determines if the current context is a direct or indirect child of the given context.
(Defined by ValidationContextExtensions.)
Public Extension MethodIsRootContext
Determines if the current context is the root context.
(Defined by ValidationContextExtensions.)
Top
See Also