Partager via


DefaultServices.GetService Method

Gets a service of the specified type.

Namespace:  System.Web.Http.Services
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

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

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

Parameters

Return Value

Type: System.Object
The first instance of the service, or null if the service is not found.

See Also

Reference

DefaultServices Class

System.Web.Http.Services Namespace