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 Null if the service is not available.

Implements

IServiceProvider.GetService(Type)

Remarks

A service object of type serviceType or null if there is no service object of type serviceType.

See Also

Reference

DataServiceOperationContext Class

System.Data.Services Namespace