ServiceProvider.AddInstance<TService> Method (Object)

Adds an instance of service provider.

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

Syntax

'Declaration
Public Overridable Function AddInstance(Of TService) ( _
    instance As Object _
) As ServiceProvider
'Usage
Dim instance As ServiceProvider 
Dim instance As Object 
Dim returnValue As ServiceProvider 

returnValue = instance.AddInstance(instance)
public virtual ServiceProvider AddInstance<TService>(
    Object instance
)
public:
generic<typename TService>
virtual ServiceProvider^ AddInstance(
    Object^ instance
)
abstract AddInstance : 
        instance:Object -> ServiceProvider  
override AddInstance : 
        instance:Object -> ServiceProvider
JScript does not support generic types and methods.

Type Parameters

  • TService
    The type of the service.

Parameters

  • instance
    Type: System.Object
    An instance of service provider to add.

Return Value

Type: Microsoft.Owin.Hosting.Services.ServiceProvider
The added ServiceProvider object.

See Also

Reference

ServiceProvider Class

AddInstance Overload

Microsoft.Owin.Hosting.Services Namespace