1 write to ServiceKey
Microsoft.Extensions.DependencyInjection (1)
ServiceLookup\ServiceIdentifier.cs (1)
22ServiceKey = serviceKey;
23 references to ServiceKey
Microsoft.Extensions.DependencyInjection (23)
ServiceLookup\CallSiteFactory.cs (11)
216if (serviceIdentifier.ServiceKey != null) 239if (serviceIdentifier.ServiceKey != null) 274var cacheKey = new ServiceIdentifier(serviceIdentifier.ServiceKey, itemType); 289!KeyedService.AnyKey.Equals(cacheKey.ServiceKey) && 320if (KeysMatch(_descriptors[i].ServiceKey, cacheKey.ServiceKey)) 330if (KeysMatch(_descriptors[i].ServiceKey, cacheKey.ServiceKey)) 392callSite = new FactoryCallSite(lifetime, descriptor.ServiceType, serviceIdentifier.ServiceKey!, descriptor.KeyedImplementationFactory); 581if (serviceIdentifier.ServiceKey != null && attribute is ServiceKeyAttribute) 584if (parameterType != serviceIdentifier.ServiceKey.GetType()) 588callSite = new ConstantCallSite(parameterType, serviceIdentifier.ServiceKey); 676if (serviceIdentifier.ServiceKey != null && _descriptorLookup.ContainsKey(new ServiceIdentifier(KeyedService.AnyKey, serviceType)))
ServiceLookup\ILEmit\ILEmitResolverBuilder.cs (1)
282AddConstant(argument, id.ServiceKey);
ServiceLookup\ServiceIdentifier.cs (11)
33if (ServiceKey == null && other.ServiceKey == null) 37else if (ServiceKey != null && other.ServiceKey != null) 39return ServiceType == other.ServiceType && ServiceKey.Equals(other.ServiceKey); 51if (ServiceKey == null) 57return (ServiceType.GetHashCode() * 397) ^ ServiceKey.GetHashCode(); 63public ServiceIdentifier GetGenericTypeDefinition() => new ServiceIdentifier(ServiceKey, ServiceType.GetGenericTypeDefinition()); 67if (ServiceKey == null) 72return $"({ServiceKey}, {ServiceType})";