12 references to AddKeyedSingleton
Aspire.Azure.Messaging.EventHubs.Tests (1)
AspireEventHubsExtensionsTests.cs (1)
63services.AddKeyedSingleton("blobs", blobClient);
BasicTestApp (2)
Program.cs (2)
45builder.Services.AddKeyedSingleton("keyed-service-1", TestKeyedService.Create("value-1")); 46builder.Services.AddKeyedSingleton(TestServiceKey.ServiceB, TestKeyedService.Create("value-2"));
Microsoft.AspNetCore.Http.Extensions.Tests (7)
RequestDelegateGenerator\RequestDelegateCreationTests.KeyServices.cs (7)
22var serviceProvider = CreateServiceProvider((serviceCollection) => serviceCollection.AddKeyedSingleton("service1", myOriginalService)); 38var serviceProvider = CreateServiceProvider((serviceCollection) => serviceCollection.AddKeyedSingleton("service1", myOriginalService)); 66serviceCollection.AddKeyedSingleton("", myOriginalService1); 88var serviceProvider = CreateServiceProvider((serviceCollection) => serviceCollection.AddKeyedSingleton('a', myOriginalService)); 108var serviceProvider = CreateServiceProvider((serviceCollection) => serviceCollection.AddKeyedSingleton(key, myOriginalService)); 163serviceCollection.AddKeyedSingleton("service1", myOriginalService1); 191serviceCollection.AddKeyedSingleton("service1", myOriginalService1);
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
EndpointMetadataApiDescriptionProviderTest.cs (1)
1535serviceCollection.AddKeyedSingleton("foo", new InferredServiceClass());
Microsoft.AspNetCore.Mvc.Razor.Test (1)
RazorPageActivatorTest.cs (1)
252.AddKeyedSingleton(KeyedServiceKey, myService)