ServiceProvider.GetService Method

Gets a service provider with a given type.

Namespace:  Microsoft.Owin.Hosting.Services
Assembly:  Microsoft.Owin.Hosting (in Microsoft.Owin.Hosting.dll)

Syntax

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

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

Parameters

  • serviceType
    Type: System.Type
    The type of the service provider to get.

Return Value

Type: System.Object
The service provider object.

Implements

IServiceProvider.GetService(Type)

See Also

Reference

ServiceProvider Class

Microsoft.Owin.Hosting.Services Namespace