Deila með


ServiceProviderServiceExtensions Class

Definition

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 serviceType from the IServiceProvider.

GetRequiredService<T>(IServiceProvider)

Get service of type T from the IServiceProvider.

GetService<T>(IServiceProvider)

Get service of type T from the IServiceProvider.

GetServices(IServiceProvider, Type)

Get an enumeration of services of type serviceType from the IServiceProvider.

GetServices<T>(IServiceProvider)

Get an enumeration of services of type T from the IServiceProvider.

Applies to