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