18 references to KeyedService
Microsoft.AspNetCore.OpenApi (3)
Extensions\OpenApiServiceCollectionExtensions.cs (3)
131
services.TryAddKeyedSingleton<OpenApiSchemaService>(
KeyedService
.AnyKey);
132
services.TryAddKeyedSingleton<OpenApiDocumentService>(
KeyedService
.AnyKey);
133
services.TryAddKeyedSingleton<IOpenApiDocumentProvider, OpenApiDocumentService>(
KeyedService
.AnyKey);
Microsoft.Extensions.DependencyInjection (11)
ServiceLookup\CallSiteFactory.cs (7)
219
var catchAllIdentifier = new ServiceIdentifier(
KeyedService
.AnyKey, serviceIdentifier.ServiceType);
242
var catchAllIdentifier = new ServiceIdentifier(
KeyedService
.AnyKey, genericIdentifier.ServiceType);
285
bool isAnyKeyLookup = serviceIdentifier.ServiceKey ==
KeyedService
.AnyKey;
445
if (descriptorKey.Equals(
KeyedService
.AnyKey))
451
|| lookupKey.Equals(
KeyedService
.AnyKey);
765
if (serviceIdentifier.ServiceKey ==
KeyedService
.AnyKey)
866
if (serviceIdentifier.ServiceKey != null && _descriptorLookup.ContainsKey(new ServiceIdentifier(
KeyedService
.AnyKey, serviceType)))
ServiceProvider.cs (4)
111
/// <exception cref="InvalidOperationException">The <see cref="
KeyedService
.AnyKey"/> value is used for <paramref name="serviceKey"/>
119
if (serviceKey ==
KeyedService
.AnyKey)
136
/// <exception cref="InvalidOperationException">The service wasn't found or the <see cref="
KeyedService
.AnyKey"/> value is used
141
if (serviceKey ==
KeyedService
.AnyKey)
Microsoft.Extensions.DependencyInjection.Abstractions (1)
EmptyServiceProvider.cs (1)
99
if (ReferenceEquals(serviceKey,
KeyedService
.AnyKey) &&
Microsoft.Extensions.Http (3)
DependencyInjection\HttpClientBuilderExtensions.cs (2)
683
/// the key <see cref="
KeyedService
.AnyKey"/> is used, so any named <see cref="HttpClient"/> instance will be resolvable as a keyed service (unless explicitly opted-out
725
/// it will only affect the previous "global" <see cref="
KeyedService
.AnyKey"/> registration, and won't affect the clients registered for a specific name
DependencyInjection\HttpClientKeyedLifetime.cs (1)
35
public HttpClientKeyedLifetime(ServiceLifetime lifetime) : this(
KeyedService
.AnyKey, lifetime) { }