4 implementations of IKeyedServiceProvider
Microsoft.Extensions.AI (1)
EmptyServiceProvider.cs (1)
10internal sealed class EmptyServiceProvider : IKeyedServiceProvider
Microsoft.Extensions.DependencyInjection (2)
ServiceLookup\ServiceProviderEngineScope.cs (1)
16internal sealed class ServiceProviderEngineScope : IServiceScope, IServiceProvider, IKeyedServiceProvider, IAsyncDisposable, IServiceScopeFactory
ServiceProvider.cs (1)
20public sealed class ServiceProvider : IServiceProvider, IKeyedServiceProvider, IDisposable, IAsyncDisposable
Microsoft.Maui (1)
MauiContext.cs (1)
81 class KeyedWrappedServiceProvider : WrappedServiceProvider, IKeyedServiceProvider
20 references to IKeyedServiceProvider
Microsoft.AspNetCore.Components (2)
DefaultComponentPropertyActivator.cs (2)
81if (serviceProvider is not IKeyedServiceProvider keyedServiceProvider) 85$"does not implement '{nameof(IKeyedServiceProvider)}' and therefore " +
Microsoft.AspNetCore.Http.Abstractions (1)
Extensions\UseMiddlewareExtensions.cs (1)
337if (sp is IKeyedServiceProvider ksp)
Microsoft.AspNetCore.Mvc.Core (2)
ModelBinding\Binders\KeyedServicesModelBinder.cs (2)
24var keyedServices = bindingContext.HttpContext.RequestServices as IKeyedServiceProvider;
Microsoft.Extensions.AI.Tests (5)
ChatCompletion\ChatClientBuilderTest.cs (2)
90var keyedServiceProvider = Assert.IsAssignableFrom<IKeyedServiceProvider>(serviceProvider);
Functions\AIFunctionFactoryTest.cs (1)
1170(a.Services as IKeyedServiceProvider)?.GetKeyedService(p.ParameterType, attr.Key) is { } s ? s :
Image\ImageGeneratorBuilderTests.cs (2)
90var keyedServiceProvider = Assert.IsAssignableFrom<IKeyedServiceProvider>(serviceProvider);
Microsoft.Extensions.DependencyInjection.Abstractions (6)
ActivatorUtilities.cs (2)
783if (serviceProvider is IKeyedServiceProvider keyedServiceProvider) 1216if (provider is IKeyedServiceProvider keyedServiceProvider)
IKeyedServiceProvider.cs (1)
35/// Provides static APIs for use with <see cref="IKeyedServiceProvider"/>.
ServiceProviderKeyedServiceExtensions.cs (3)
26if (provider is IKeyedServiceProvider keyedServiceProvider) 46if (provider is IKeyedServiceProvider keyedServiceProvider) 67if (provider is IKeyedServiceProvider requiredServiceSupportingProvider)
Microsoft.Maui (4)
Hosting\Dispatching\AppHostBuilderExtensions.cs (2)
34 if (provider is IKeyedServiceProvider keyed) 48 if (provider is IKeyedServiceProvider keyed)
MauiContext.cs (2)
27 _services = services is IKeyedServiceProvider 90 if (Inner is IKeyedServiceProvider provider)