1 write to ServiceKey
Microsoft.Extensions.DependencyInjection.Abstractions (1)
ServiceDescriptor.cs (1)
133
ServiceKey
= serviceKey;
76 references to ServiceKey
Microsoft.AspNetCore.OpenApi.Tests (12)
Extensions\OpenApiServiceCollectionExtensionsTests.cs (12)
38
Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.
ServiceKey
== documentName);
39
Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.
ServiceKey
== documentName);
72
Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.
ServiceKey
== documentName);
73
Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.
ServiceKey
== documentName);
105
Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.
ServiceKey
== documentName);
106
Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.
ServiceKey
== documentName);
138
Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.
ServiceKey
== documentName);
139
Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.
ServiceKey
== documentName);
160
Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.
ServiceKey
== documentName);
161
Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.
ServiceKey
== documentName);
184
Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.
ServiceKey
== documentName);
185
Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.
ServiceKey
== documentName);
Microsoft.Extensions.DependencyInjection (4)
ServiceLookup\CallSiteFactory.cs (3)
320
if (KeysMatch(_descriptors[i].
ServiceKey
, cacheKey.ServiceKey))
330
if (KeysMatch(_descriptors[i].
ServiceKey
, cacheKey.ServiceKey))
402
callSite.Key = descriptor.
ServiceKey
;
ServiceLookup\ServiceIdentifier.cs (1)
27
=> new ServiceIdentifier(serviceDescriptor.
ServiceKey
, serviceDescriptor.ServiceType);
Microsoft.Extensions.DependencyInjection.Abstractions (60)
Extensions\ServiceCollectionDescriptorExtensions.cs (7)
70
&& object.Equals(collection[i].
ServiceKey
, descriptor.
ServiceKey
))
477
object.Equals(service.
ServiceKey
, descriptor.
ServiceKey
))
535
if (collection[i].ServiceType == descriptor.ServiceType && object.Equals(collection[i].
ServiceKey
, descriptor.
ServiceKey
))
569
if (descriptor.ServiceType == serviceType && descriptor.
ServiceKey
== null)
Extensions\ServiceCollectionDescriptorExtensions.Keyed.cs (1)
404
if (descriptor.ServiceType == serviceType && object.Equals(descriptor.
ServiceKey
, serviceKey))
IKeyedServiceProvider.cs (1)
27
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
IServiceProviderIsKeyedService.cs (1)
19
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
ServiceCollectionServiceExtensions.Keyed.cs (23)
21
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
45
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
70
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
90
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
110
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
130
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
155
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
179
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
203
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
228
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
248
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
268
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
288
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
313
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
337
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
361
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
386
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
406
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
426
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
446
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
471
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
495
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
520
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
ServiceDescriptor.cs (27)
34
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
68
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
104
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
253
public bool IsKeyedService =>
ServiceKey
!= null;
262
lifetime += $"{nameof(
ServiceKey
)}: {
ServiceKey
} ";
294
if (
ServiceKey
== null)
359
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
392
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
434
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
470
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
503
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
536
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
566
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
605
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
641
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
674
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
707
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
741
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
783
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
819
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
856
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
892
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
929
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
979
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
1012
/// <param name="serviceKey">The <see cref="ServiceDescriptor.
ServiceKey
"/> of the service.</param>
1028
debugText += $@", ServiceKey = ""{
ServiceKey
}""";