ValidationContext Constructor (Object, IServiceProvider, IDictionary(Of Object, Object))
.NET Framework (current version)
Initializes a new instance of the ValidationContext class using the service provider and dictionary of service consumers.
Assembly: System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)
Public Sub New ( instance As Object, serviceProvider As IServiceProvider, items As IDictionary(Of Object, Object) )
Parameters
- instance
-
Type:
System.Object
The object to validate. This parameter is required.
- serviceProvider
-
Type:
System.IServiceProvider
The object that implements the IServiceProvider interface. This parameter is optional.
- items
-
Type:
System.Collections.Generic.IDictionary(Of Object, Object)
A dictionary of key/value pairs to make available to the service consumers. This parameter is optional.
The serviceProvider parameter represents a service that can be used by the GetService method in order to perform custom validation.
If the items parameter is null, an empty dictionary is created. If the parameter is not null, the set of key/value pairs is copied into a new dictionary, which prevents the service consumers from modifying the original dictionary.
Universal Windows Platform
Available since 10
.NET Framework
Available since 4.0
Silverlight
Available since 3.0
Available since 10
.NET Framework
Available since 4.0
Silverlight
Available since 3.0
Show: