Click or drag to resize

ValidationContext Class

Class that represents a validation context for an entity.
Inheritance Hierarchy

Namespace:  Xploration.Validation
Assembly:  Xploration.Validation (in Xploration.Validation.dll) Version: 1.0.0-alpha1
Syntax
public class ValidationContext

The ValidationContext type exposes the following members.

Constructors
  NameDescription
Protected methodValidationContext
Initializes a new instance of the ValidationContext class.
Public methodValidationContext(Object)
Initializes a new instance of the ValidationContext class with an entity that represents the new state.
Public methodValidationContext(Object, Object)
Initializes a new instance of the ValidationContext class with entities 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.
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.
Public propertyNewValue
Gets the new state of the entity.
Public propertyOldValue
Gets the old state of the entity.
Public propertyParent
Gets or sets the parent context of the current context.
Public propertyResults
Gets a collection of validation results that are related to the current context.
Public propertyTransition
Gets the transition between the old and new value.
Public propertyUserState
Gets or sets an user defined state object.
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.
Public methodRegisterResult(IValidator, Boolean, Object)
Registers a validation result for the current context.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
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