6 references to TryAddKeyedSingleton
Microsoft.AspNetCore.OpenApi (1)
Extensions\OpenApiServiceCollectionExtensions.cs (1)
133
services.
TryAddKeyedSingleton
<IOpenApiDocumentProvider, OpenApiDocumentService>(KeyedService.AnyKey);
Microsoft.Extensions.Caching.Hybrid.Tests (3)
ServiceConstructionTests.cs (3)
59
services.
TryAddKeyedSingleton
<IDistributedCache, CustomMemoryDistributedCache1>(typeof(CustomMemoryDistributedCache1));
184
services.
TryAddKeyedSingleton
<IDistributedCache, CustomMemoryDistributedCache1>(typeof(CustomMemoryDistributedCache1));
185
services.
TryAddKeyedSingleton
<IDistributedCache, CustomMemoryDistributedCache2>(typeof(CustomMemoryDistributedCache2));
Microsoft.Extensions.Http.Diagnostics (2)
Logging\HttpClientLoggingHttpClientBuilderExtensions.cs (2)
165
builder.Services.
TryAddKeyedSingleton
<IHttpRequestReader, HttpRequestReader>(builder.Name);
166
builder.Services.
TryAddKeyedSingleton
<IHttpHeadersReader, HttpHeadersReader>(builder.Name);