Export (0) Print
Expand All

ValidationContext.InitializeServiceProvider Method

Initializes the ValidationContext with a service provider that can return service instances of the specified type when the GetService method is called.

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

public void InitializeServiceProvider(
	Func<Type, Object> serviceProvider
)

Parameters

serviceProvider
Type: System.Func<Type, Object>
A service provider that can return service instances of the specified type when GetService is called.
If serviceProvider is null, GetService will always return null.

Silverlight

Supported in: 5

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