DataServiceOperationContext.GetService Method

Returns the service that provides custom operation.

Namespace:  System.Data.Services
Assembly:  Microsoft.Data.Services (in Microsoft.Data.Services.dll)

Syntax

'Declaration
Public Function GetService ( _
    serviceType As Type _
) As Object
'Usage
Dim instance As DataServiceOperationContext 
Dim serviceType As Type 
Dim returnValue As Object 

returnValue = instance.GetService(serviceType)
public Object GetService(
    Type serviceType
)
public:
virtual Object^ GetService(
    Type^ serviceType
) sealed
abstract GetService : 
        serviceType:Type -> Object  
override GetService : 
        serviceType:Type -> Object
public final function GetService(
    serviceType : Type
) : Object

Parameters

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

Return Value

Type: System.Object
An instance of the service, or Nothing if the service is not available.

Implements

IServiceProvider.GetService(Type)

See Also

Reference

DataServiceOperationContext Class

System.Data.Services Namespace