Share via


ServiceProvider.AddInstance Method

 

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

Overload List

Name Description
System_CAPS_pubmethod AddInstance(Type, Object)

Add an instance of the given type to the list of providers.

System_CAPS_pubmethod AddInstance<TService>(Object)

Add an instance of type TService to the list of providers.

See Also

ServiceProvider Class
Microsoft.Owin.Hosting.Services Namespace

Return to top

ServiceProvider.AddInstance Method (Type, Object)

Add an instance of the given type to the list of providers.

Syntax

public virtual ServiceProvider AddInstance(
    Type service,
    object instance
)
public:
virtual ServiceProvider^ AddInstance(
    Type^ service,
    Object^ instance
)
abstract AddInstance : 
        service:Type *
        instance:Object -> ServiceProvider
override AddInstance : 
        service:Type *
        instance:Object -> ServiceProvider
Public Overridable Function AddInstance (
    service As Type,
    instance As Object
) As ServiceProvider

Parameters

Return Value

Type: Microsoft.Owin.Hosting.Services.ServiceProvider

Returns ServiceProvider.

Return to top

ServiceProvider.AddInstance<TService> Method (Object)

Add an instance of type TService to the list of providers.

Syntax

public virtual ServiceProvider AddInstance<TService>(
    object instance
)
public:
generic<typename TService>
virtual ServiceProvider^ AddInstance(
    Object^ instance
)
abstract AddInstance<'TService> : 
        instance:Object -> ServiceProvider
override AddInstance<'TService> : 
        instance:Object -> ServiceProvider
Public Overridable Function AddInstance(Of TService) (
    instance As Object
) As ServiceProvider

Parameters

Return Value

Type: Microsoft.Owin.Hosting.Services.ServiceProvider

Returns ServiceProvider.

Type Parameters

  • TService

Return to top