London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Class ContextValidatorWrapper<TInstance, TContext>

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Class that encapsulates an instance of IValidate<T> of IContextValidate<TInstance, TContext>

Inheritance
System.Object
ContextValidatorWrapper<TInstance, TContext>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Validation.Internal
Assembly: EPiServer.Framework.dll
Version: 10.10.4
Syntax
public class ContextValidatorWrapper<TInstance, TContext> : ValidatorWrapper
Type Parameters
Name Description
TInstance

The type the validator validates

TContext

The context the validator is registered for

Constructors

ContextValidatorWrapper(IValidate)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the ContextValidatorWrapper<TInstance, TContext> class.

Declaration
public ContextValidatorWrapper(IValidate implementation)
Parameters
Type Name Description
IValidate implementation

The implementation.

Properties

ContextType

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. The context type for the IContextValidate<TInstance, TContext>

Declaration
public override Type ContextType { get; }
Property Value
Type Description
System.Type
Overrides

EncapsulatedValidator

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the encapsulated validator.

Declaration
public override object EncapsulatedValidator { get; }
Property Value
Type Description
System.Object

The encapsulated validator.

Overrides

TypeToValidate

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the type to validate.

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

The type to validate.

Overrides

Methods

Validate(Object)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Validates the specified instance.

Declaration
public override IEnumerable<ValidationError> Validate(object instance)
Parameters
Type Name Description
System.Object instance

The instance.

Returns
Type Description
System.Collections.Generic.IEnumerable<ValidationError>
Overrides

Validate(Object, Object)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Calls the wrapped validator with conext if context is supported.

Declaration
public override IEnumerable<ValidationError> Validate(object instance, object context)
Parameters
Type Name Description
System.Object instance

The instance to validate

System.Object context

The context for the validation

Returns
Type Description
System.Collections.Generic.IEnumerable<ValidationError>
Overrides

Extension Methods