Share via


ServiceProvider Class

 

The default IServiceProvider.

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

Inheritance Hierarchy

System.Object
  Microsoft.Owin.Hosting.Services.ServiceProvider

Syntax

public class ServiceProvider : IServiceProvider
public ref class ServiceProvider : IServiceProvider
type ServiceProvider = 
    class
        interface IServiceProvider
    end
Public Class ServiceProvider
    Implements IServiceProvider

Constructors

Name Description
System_CAPS_pubmethod ServiceProvider()

Initializes a new instance of the ServiceProvider class.

Methods

Name Description
System_CAPS_pubmethod Add(Type, Func<Object>)

Specify that services of the given type should be created with the given serviceFactory.

System_CAPS_pubmethod Add(Type, Type)

Specify that services of the type serviceType should be fulfilled by the type implementationType.

System_CAPS_pubmethod Add<TService, TImplementation>()

Specify that services of the type TService should be fulfilled by the type TImplementation.

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.

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetService(Type)

Gets the service object of the specified type.

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod RemoveAll(Type)

Remove all occurrences of the given type from the provider.

System_CAPS_pubmethod RemoveAll<T>()

Remove all occurrences of the given type from the provider.

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Extension Methods

Name Description
System_CAPS_pubmethod GetService<T>()

Retrieve a service of type T from the IServiceProvider.(Defined by ServiceProviderExtensions.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.Owin.Hosting.Services Namespace

Return to top