ServiceProviderKeyedServiceExtensions Class

Definition

Extension methods for getting services from an IServiceProvider.

C#
public static class ServiceProviderKeyedServiceExtensions
Inheritance
ServiceProviderKeyedServiceExtensions

Methods

GetKeyedService(IServiceProvider, Type, Object)

Get service of type serviceType from the IServiceProvider.

GetKeyedService<T>(IServiceProvider, Object)

Get service of type T from the IServiceProvider.

GetKeyedServices(IServiceProvider, Type, Object)

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

GetKeyedServices<T>(IServiceProvider, Object)

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

GetRequiredKeyedService(IServiceProvider, Type, Object)

Get service of type serviceType from the IServiceProvider.

GetRequiredKeyedService<T>(IServiceProvider, Object)

Get service of type T from the IServiceProvider.

Applies to

Produkt Wersje
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)