Compartilhar via


DomainDataService.GetService Method

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Gets the data service object of the specified type.

Namespace:  System.ServiceModel.DomainServices.Hosting.OData
Assembly:  System.ServiceModel.DomainServices.Hosting.OData (in System.ServiceModel.DomainServices.Hosting.OData.dll)

Syntax

'Declaration
Public Function GetService ( _
    serviceType As Type _
) As Object
'Usage
Dim instance As DomainDataService
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
    An object that specifies the type of data service object to get.

Return Value

Type: System.Object
A data service object of type specified in serviceType.

Implements

IServiceProvider.GetService(Type)

See Also

Reference

DomainDataService Class

System.ServiceModel.DomainServices.Hosting.OData Namespace