Class ServiceProviderKeyedServiceExtensions
Inheritance
ServiceProviderKeyedServiceExtensions
Assembly: Microsoft.Extensions.DependencyInjection.Abstractions.dll
Syntax
public static class ServiceProviderKeyedServiceExtensions
Methods
GetKeyedService<T>(IServiceProvider, object?)
Declaration
public static T? GetKeyedService<T>(this IServiceProvider provider, object? serviceKey)
Parameters
Returns
Type Parameters
GetKeyedServices(IServiceProvider, Type, object?)
Declaration
public static IEnumerable<object?> GetKeyedServices(this IServiceProvider provider, Type serviceType, object? serviceKey)
Parameters
Returns
GetKeyedServices<T>(IServiceProvider, object?)
Declaration
public static IEnumerable<T> GetKeyedServices<T>(this IServiceProvider provider, object? serviceKey)
Parameters
Returns
Type Parameters
GetRequiredKeyedService(IServiceProvider, Type, object?)
Declaration
public static object GetRequiredKeyedService(this IServiceProvider provider, Type serviceType, object? serviceKey)
Parameters
Returns
GetRequiredKeyedService<T>(IServiceProvider, object?)
Declaration
public static T GetRequiredKeyedService<T>(this IServiceProvider provider, object? serviceKey) where T : notnull
Parameters
Returns
Type Parameters