14 references to AddKeyedSingleton
Aspire.Hosting (3)
DistributedApplicationBuilder.cs (2)
393_innerBuilder.Services.AddKeyedSingleton<IContainerRuntime, DockerContainerRuntime>("docker"); 394_innerBuilder.Services.AddKeyedSingleton<IContainerRuntime, PodmanContainerRuntime>("podman");
PublisherDistributedApplicationBuilderExtensions.cs (1)
27builder.Services.AddKeyedSingleton<IDistributedApplicationPublisher, TPublisher>(name);
Aspire.Hosting.Tests (7)
AsHttp2ServiceTests.cs (3)
18testProgram.AppBuilder.Services.AddKeyedSingleton<IDistributedApplicationPublisher, NoopPublisher>("manifest"); 39testProgram.AppBuilder.Services.AddKeyedSingleton<IDistributedApplicationPublisher, NoopPublisher>("manifest"); 57testProgram.AppBuilder.Services.AddKeyedSingleton<IDistributedApplicationPublisher, NoopPublisher>("manifest");
ManifestGenerationTests.cs (2)
117appBuilder.Services.AddKeyedSingleton<IDistributedApplicationPublisher, JsonDocumentManifestPublisher>("manifest"); 530program.AppBuilder.Services.AddKeyedSingleton<IDistributedApplicationPublisher, JsonDocumentManifestPublisher>("manifest");
ProjectResourceTests.cs (1)
667appBuilder.Services.AddKeyedSingleton<IDistributedApplicationPublisher, NoopPublisher>("manifest");
Schema\SchemaTests.cs (1)
222builder.Services.AddKeyedSingleton<IDistributedApplicationPublisher, JsonDocumentManifestPublisher>("manifest");
BasicWebSite (2)
StartupWithoutEndpointRouting.cs (2)
46services.AddKeyedSingleton<ICustomService, OkCustomService>("ok_service"); 47services.AddKeyedSingleton<ICustomService, BadCustomService>("not_ok_service");
Microsoft.AspNetCore.OpenApi (1)
Extensions\OpenApiServiceCollectionExtensions.cs (1)
114services.AddKeyedSingleton<IOpenApiDocumentProvider, OpenApiDocumentService>(documentName);
Microsoft.Extensions.DependencyInjection.AutoActivation (1)
AutoActivationExtensions.Keyed.cs (1)
132.AddKeyedSingleton<TService, TImplementation>(serviceKey)