1 write to ServiceKey
Microsoft.Extensions.DependencyInjection.Abstractions (1)
ServiceDescriptor.cs (1)
133ServiceKey = serviceKey;
76 references to ServiceKey
Microsoft.AspNetCore.OpenApi.Tests (12)
Extensions\OpenApiServiceCollectionExtensionsTests.cs (12)
38Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); 39Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); 72Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); 73Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); 105Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); 106Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); 138Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); 139Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); 160Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); 161Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); 184Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); 185Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
Microsoft.Extensions.DependencyInjection (4)
ServiceLookup\CallSiteFactory.cs (3)
320if (KeysMatch(_descriptors[i].ServiceKey, cacheKey.ServiceKey)) 330if (KeysMatch(_descriptors[i].ServiceKey, cacheKey.ServiceKey)) 402callSite.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)) 477object.Equals(service.ServiceKey, descriptor.ServiceKey)) 535if (collection[i].ServiceType == descriptor.ServiceType && object.Equals(collection[i].ServiceKey, descriptor.ServiceKey)) 569if (descriptor.ServiceType == serviceType && descriptor.ServiceKey == null)
Extensions\ServiceCollectionDescriptorExtensions.Keyed.cs (1)
404if (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> 253public bool IsKeyedService => ServiceKey != null; 262lifetime += $"{nameof(ServiceKey)}: {ServiceKey} "; 294if (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> 1028debugText += $@", ServiceKey = ""{ServiceKey}""";