2 writes to ServiceType
Microsoft.Extensions.DependencyInjection (2)
ServiceLookup\ServiceIdentifier.cs (2)
17
ServiceType
= serviceType;
23
ServiceType
= serviceType;
31 references to ServiceType
Microsoft.Extensions.DependencyInjection (31)
ServiceLookup\CallSiteChain.cs (5)
41
messageBuilder.Append(SR.Format(SR.CircularDependencyException, TypeNameHelper.GetTypeDisplayName(serviceIdentifier.
ServiceType
)));
58
if (implementationType == null || serviceIdentifier.
ServiceType
== implementationType)
60
builder.Append(TypeNameHelper.GetTypeDisplayName(serviceIdentifier.
ServiceType
));
64
builder.Append(TypeNameHelper.GetTypeDisplayName(serviceIdentifier.
ServiceType
))
73
builder.Append(TypeNameHelper.GetTypeDisplayName(currentlyResolving.
ServiceType
));
ServiceLookup\CallSiteFactory.cs (14)
219
var catchAllIdentifier = new ServiceIdentifier(KeyedService.AnyKey, serviceIdentifier.
ServiceType
);
231
if (serviceIdentifier.
ServiceType
.IsConstructedGenericType)
242
var catchAllIdentifier = new ServiceIdentifier(KeyedService.AnyKey, genericIdentifier.
ServiceType
);
265
var serviceType = serviceIdentifier.
ServiceType
;
325
if (ShouldCreateExact(_descriptors[i].ServiceType, cacheKey.
ServiceType
))
342
if (ShouldCreateOpenGeneric(_descriptors[i].ServiceType, cacheKey.
ServiceType
))
456
if (ShouldCreateExact(descriptor.ServiceType, serviceIdentifier.
ServiceType
))
504
if (ShouldCreateOpenGeneric(descriptor.ServiceType, serviceIdentifier.
ServiceType
))
537
Type[] genericTypeArguments = serviceIdentifier.
ServiceType
.GenericTypeArguments;
540
VerifyOpenGenericAotCompatibility(serviceIdentifier.
ServiceType
, genericTypeArguments);
583
return new ConstructorCallSite(lifetime, serviceIdentifier.
ServiceType
, constructor, serviceIdentifier.ServiceKey);
593
return new ConstructorCallSite(lifetime, serviceIdentifier.
ServiceType
, constructor, parameterCallSites, serviceIdentifier.ServiceKey);
657
return new ConstructorCallSite(lifetime, serviceIdentifier.
ServiceType
, bestConstructor, parameterCallSites, serviceIdentifier.ServiceKey);
768
var serviceType = serviceIdentifier.
ServiceType
;
ServiceLookup\ILEmit\ILEmitResolverBuilder.cs (1)
283
argument.Generator.Emit(OpCodes.Ldtoken, id.
ServiceType
);
ServiceLookup\ServiceIdentifier.cs (9)
35
return
ServiceType
== other.
ServiceType
;
39
return
ServiceType
== other.
ServiceType
&& ServiceKey.Equals(other.ServiceKey);
53
return
ServiceType
.GetHashCode();
57
return (
ServiceType
.GetHashCode() * 397) ^ ServiceKey.GetHashCode();
61
public ServiceIdentifier GetGenericTypeDefinition() => new ServiceIdentifier(ServiceKey,
ServiceType
.GetGenericTypeDefinition());
67
return
ServiceType
.ToString();
70
return $"({ServiceKey}, {
ServiceType
})";
ServiceProvider.cs (2)
213
DependencyInjectionEventSource.Log.ServiceResolved(this, serviceIdentifier.
ServiceType
);
245
DependencyInjectionEventSource.Log.CallSiteBuilt(this, serviceIdentifier.
ServiceType
, callSite);