共用方式為


ServiceProviderKeyedServiceExtensions Class

Definition

Extension methods for getting services from an IServiceProvider.

public ref class ServiceProviderKeyedServiceExtensions abstract sealed
public static class ServiceProviderKeyedServiceExtensions
type ServiceProviderKeyedServiceExtensions = class
Public Module ServiceProviderKeyedServiceExtensions
Inheritance
ServiceProviderKeyedServiceExtensions

Methods

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