Export (0) Print
Expand All

ValidationContext Constructor (Object, IServiceProvider, IDictionary<Object, Object>)

Initializes a new instance of the ValidationContext class with the specified object to validate, a service provider that enables validation methods to access external services, and a collection of values related to validation.

Namespace:  System.ComponentModel.DataAnnotations
Assembly:  System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)

public ValidationContext(
	Object instance,
	IServiceProvider serviceProvider,
	IDictionary<Object, Object> items
)

Parameters

instance
Type: System.Object
The object to validate.
serviceProvider
Type: System.IServiceProvider
A service provider that enables validation methods to access external services. This value can be null.
items
Type: System.Collections.Generic.IDictionary<Object, Object>
A collection of values related to validation. This value can be null.

ExceptionCondition
ArgumentNullException

instance is null.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft