Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
InitializeServiceProvider Method
Collapse the table of content
Expand the table of content

ValidationContext.InitializeServiceProvider Method

.NET Framework 4.6 and 4.5

Initializes the ValidationContext using a service provider that can return service instances by type when GetService is called.

Namespace:  System.ComponentModel.DataAnnotations
Assemblies:   System.ComponentModel.Annotations (in System.ComponentModel.Annotations.dll)
  System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)

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

Parameters

serviceProvider
Type: System.Func<Type, Object>

The service provider.

.NET Framework

Supported in: 4.6, 4.5

Portable Class Library

Supported in: Portable Class Library
Show:
© 2015 Microsoft