ServiceProviderServiceExtensions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Extension methods for getting services from an IServiceProvider.
public ref class ServiceProviderServiceExtensions abstract sealed
public static class ServiceProviderServiceExtensions
type ServiceProviderServiceExtensions = class
Public Module ServiceProviderServiceExtensions
- Inheritance
-
ServiceProviderServiceExtensions
Methods
CreateAsyncScope(IServiceProvider) |
Creates a new AsyncServiceScope that can be used to resolve scoped services. |
CreateAsyncScope(IServiceScopeFactory) |
Creates a new AsyncServiceScope that can be used to resolve scoped services. |
CreateScope(IServiceProvider) |
Creates a new IServiceScope that can be used to resolve scoped services. |
GetRequiredService(IServiceProvider, Type) |
Get service of type |
GetRequiredService<T>(IServiceProvider) |
Get service of type |
GetService<T>(IServiceProvider) |
Get service of type |
GetServices(IServiceProvider, Type) |
Get an enumeration of services of type |
GetServices<T>(IServiceProvider) |
Get an enumeration of services of type |