27 references to IsKeyedService
Microsoft.Extensions.DependencyInjection (7)
DependencyInjectionEventSource.cs (2)
252
else if (!descriptor.
IsKeyedService
&& descriptor.ImplementationFactory != null)
257
else if (descriptor.
IsKeyedService
&& descriptor.KeyedImplementationFactory != null)
ServiceLookup\CallSiteFactory.cs (2)
386
else if (!descriptor.
IsKeyedService
&& descriptor.ImplementationFactory != null)
390
else if (descriptor.
IsKeyedService
&& descriptor.KeyedImplementationFactory != null)
ServiceLookup\ServiceDescriptorExtensions.cs (3)
19
return serviceDescriptor.
IsKeyedService
26
return serviceDescriptor.
IsKeyedService
34
return serviceDescriptor.
IsKeyedService
Microsoft.Extensions.DependencyInjection.Abstractions (20)
ServiceDescriptor.cs (20)
156
/// or returns <see langword="null"/> if <see cref="
IsKeyedService
"/> is <see langword="true"/>.
159
/// If <see cref="
IsKeyedService
"/> is <see langword="true"/>, <see cref="KeyedImplementationType"/> should be called instead.
162
public Type? ImplementationType =>
IsKeyedService
? null : _implementationType;
166
/// or throws <see cref="InvalidOperationException"/> if <see cref="
IsKeyedService
"/> is <see langword="false"/>.
169
/// If <see cref="
IsKeyedService
"/> is <see langword="false"/>, <see cref="ImplementationType"/> should be called instead.
176
if (!
IsKeyedService
)
188
/// or returns <see langword="null"/> if <see cref="
IsKeyedService
"/> is <see langword="true"/>.
191
/// If <see cref="
IsKeyedService
"/> is <see langword="true"/>, <see cref="KeyedImplementationInstance"/> should be called instead.
193
public object? ImplementationInstance =>
IsKeyedService
? null : _implementationInstance;
197
/// or throws <see cref="InvalidOperationException"/> if <see cref="
IsKeyedService
"/> is <see langword="false"/>.
200
/// If <see cref="
IsKeyedService
"/> is <see langword="false"/>, <see cref="ImplementationInstance"/> should be called instead.
206
if (!
IsKeyedService
)
218
/// or returns <see langword="null"/> if <see cref="
IsKeyedService
"/> is <see langword="true"/>.
221
/// If <see cref="
IsKeyedService
"/> is <see langword="true"/>, <see cref="KeyedImplementationFactory"/> should be called instead.
223
public Func<IServiceProvider, object>? ImplementationFactory =>
IsKeyedService
? null : (Func<IServiceProvider, object>?) _implementationFactory;
227
/// or throws <see cref="InvalidOperationException"/> if <see cref="
IsKeyedService
"/> is <see langword="false"/>.
230
/// If <see cref="
IsKeyedService
"/> is <see langword="false"/>, <see cref="ImplementationFactory"/> should be called instead.
236
if (!
IsKeyedService
)
254
if (
IsKeyedService
)
1020
if (
IsKeyedService
)