9 implementations of IKeyedServiceProvider
Microsoft.AspNetCore.Components.Authorization.Tests (1)
src\Components\Shared\test\TestServiceProvider.cs (1)
10public class TestServiceProvider : IServiceProvider, IKeyedServiceProvider
Microsoft.AspNetCore.Components.Forms.Tests (1)
src\Components\Shared\test\TestServiceProvider.cs (1)
10public class TestServiceProvider : IServiceProvider, IKeyedServiceProvider
Microsoft.AspNetCore.Components.Tests (1)
src\Components\Shared\test\TestServiceProvider.cs (1)
10public class TestServiceProvider : IServiceProvider, IKeyedServiceProvider
Microsoft.AspNetCore.Components.Web.Tests (1)
src\Components\Shared\test\TestServiceProvider.cs (1)
10public class TestServiceProvider : IServiceProvider, IKeyedServiceProvider
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
UseMiddlewareTest.cs (1)
337private class DummyKeyedServiceProvider : IKeyedServiceProvider
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiDocumentServiceTestsBase.cs (1)
252private class TestServiceProvider : IServiceProvider, IKeyedServiceProvider, IServiceScope, IServiceScopeFactory
Microsoft.Extensions.AI (1)
EmptyServiceProvider.cs (1)
10internal sealed class EmptyServiceProvider : IKeyedServiceProvider
Microsoft.Extensions.DependencyInjection (2)
ServiceLookup\ServiceProviderEngineScope.cs (1)
15internal sealed class ServiceProviderEngineScope : IServiceScope, IServiceProvider, IKeyedServiceProvider, IAsyncDisposable, IServiceScopeFactory
ServiceProvider.cs (1)
20public sealed class ServiceProvider : IServiceProvider, IKeyedServiceProvider, IDisposable, IAsyncDisposable
23 references to IKeyedServiceProvider
Microsoft.AspNetCore.Components (2)
ComponentFactory.cs (2)
133if (serviceProvider is not IKeyedServiceProvider keyedServiceProvider) 137$"does not implement '{nameof(IKeyedServiceProvider)}' and therefore " +
Microsoft.AspNetCore.Http.Abstractions (1)
Extensions\UseMiddlewareExtensions.cs (1)
337if (sp is IKeyedServiceProvider ksp)
Microsoft.AspNetCore.Http.Abstractions.Tests (4)
UseMiddlewareTest.cs (4)
143typeof(IKeyedServiceProvider), 155$"Unable to resolve service for type '{typeof(IKeyedServiceProvider)}' while attempting to activate '{typeof(MiddlewareKeyedConstructorInjectInvoke)}'.", 415public Task Invoke(HttpContext context, [FromKeyedServices("test")] IKeyedServiceProvider provider) => Task.CompletedTask; 420public MiddlewareKeyedConstructorInjectInvoke(RequestDelegate next, [FromKeyedServices("test")] IKeyedServiceProvider provider) { }
Microsoft.AspNetCore.Mvc.Core (2)
ModelBinding\Binders\KeyedServicesModelBinder.cs (2)
24var keyedServices = bindingContext.HttpContext.RequestServices as IKeyedServiceProvider;
Microsoft.AspNetCore.OpenApi.Tests (8)
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Info.cs (2)
26new Mock<IKeyedServiceProvider>().Object, 49new Mock<IKeyedServiceProvider>().Object,
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Servers.cs (4)
27new Mock<IKeyedServiceProvider>().Object, 51new Mock<IKeyedServiceProvider>().Object, 76new Mock<IKeyedServiceProvider>().Object, 100new Mock<IKeyedServiceProvider>().Object,
Services\OpenApiDocumentServiceTestsBase.cs (2)
255private IKeyedServiceProvider _serviceProvider; 278if (scope.ServiceProvider is IKeyedServiceProvider scopedServiceProvider)
Microsoft.Extensions.DependencyInjection.Abstractions (6)
ActivatorUtilities.cs (2)
787if (serviceProvider is IKeyedServiceProvider keyedServiceProvider) 1226if (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)