Compartir a través de


DataServiceOperationContext.GetService Método

Devuelve el servicio que proporciona una operación personalizada.

Espacio de nombres:  System.Data.Services
Ensamblado:  Microsoft.Data.Services (en Microsoft.Data.Services.dll)

Sintaxis

'Declaración
Public Function GetService ( _
    serviceType As Type _
) As Object
'Uso
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

Parámetros

  • serviceType
    Tipo: System.Type
    Tipo del servicio que se va a usar para la validación.

Valor devuelto

Tipo: System.Object
Instancia del servicio o Nothing si el servicio no está disponible.

Implementa

IServiceProvider.GetService(Type)

Vea también

Referencia

DataServiceOperationContext Clase

Espacio de nombres System.Data.Services