11 references to AddKeyedSingleton
Aspire.Azure.Messaging.EventHubs.Tests (1)
AspireEventHubsExtensionsTests.cs (1)
65services.AddKeyedSingleton("blobs", blobClient);
Aspire.Dashboard.Components.Tests (2)
Interactions\InteractionsProviderTests.cs (1)
691Services.AddKeyedSingleton<IDashboardClient>(DashboardClient.LiveAppHostServiceKey, dashboardClient ?? new TestDashboardClient());
Layout\MainLayoutTests.cs (1)
1081Services.AddKeyedSingleton<IDashboardClient>(DashboardClient.LiveAppHostServiceKey, dashboardClient);
Aspire.Hosting.Azure.Tests (1)
ContainerRegistryTests.cs (1)
88builder.Services.AddKeyedSingleton<IDistributedApplicationPublisher>("test-publisher", publisherValidator);
Aspire.Hosting.TestUtilities (2)
Publishing\FakeContainerRuntimeExtensions.cs (2)
34services.AddKeyedSingleton<IContainerRuntime>(KnownContainerRuntimes.Docker, runtime); 35services.AddKeyedSingleton<IContainerRuntime>(KnownContainerRuntimes.Podman, runtime);
Microsoft.Extensions.AI.Tests (2)
Functions\AIFunctionFactoryTest.cs (2)
824sc.AddKeyedSingleton("key", service); 870sc.AddKeyedSingleton("key", service);
Microsoft.Extensions.Caching.Hybrid.Tests (2)
SerializerTests.cs (2)
246services.AddKeyedSingleton<JsonSerializerOptions>(typeof(IHybridCacheSerializer<>), globalOptions); 252services.AddKeyedSingleton<JsonSerializerOptions>(typeof(IHybridCacheSerializer<T>), perTypeOptions);
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Extensions\ServiceCollectionDescriptorExtensions.Keyed.cs (1)
368/// <seealso cref="ServiceCollectionServiceExtensions.AddKeyedSingleton{TService}(IServiceCollection, object, TService)"/>