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 | |
---|---|---|
![]() |
ServiceProvider() | Initializes a new instance of the ServiceProvider class. |
Methods
Name | Description | |
---|---|---|
![]() |
Add(Type, Func<Object>) | Specify that services of the given type should be created with the given serviceFactory. |
![]() |
Add(Type, Type) | Specify that services of the type serviceType should be fulfilled by the type implementationType. |
![]() |
Add<TService, TImplementation>() | Specify that services of the type TService should be fulfilled by the type TImplementation. |
![]() |
AddInstance(Type, Object) | Add an instance of the given type to the list of providers. |
![]() |
AddInstance<TService>(Object) | Add an instance of type TService to the list of providers. |
![]() |
Equals(Object) | (Inherited from Object.) |
![]() |
Finalize() | (Inherited from Object.) |
![]() |
GetHashCode() | (Inherited from Object.) |
![]() |
GetService(Type) | Gets the service object of the specified type. |
![]() |
GetType() | (Inherited from Object.) |
![]() |
MemberwiseClone() | (Inherited from Object.) |
![]() |
RemoveAll(Type) | Remove all occurrences of the given type from the provider. |
![]() |
RemoveAll<T>() | Remove all occurrences of the given type from the provider. |
![]() |
ToString() | (Inherited from Object.) |
Extension Methods
Name | Description | |
---|---|---|
![]() |
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