Поделиться через


ValidationContext.GetService Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Retrieves an instance of the service to use during validation.

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

Syntax

'Declaration
Public Function GetService ( _
    serviceType As Type _
) As Object
public Object GetService(
    Type serviceType
)

Parameters

  • serviceType
    Type: System.Type
    The type of the service to use during validation.

Return Value

Type: System.Object
An instance of that service or nulla null reference (Nothing in Visual Basic) if the service is not available.

Implements

IServiceProvider.GetService(Type)

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

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