27 references to IsKeyedService
Microsoft.Extensions.DependencyInjection (7)
DependencyInjectionEventSource.cs (2)
252else if (!descriptor.IsKeyedService && descriptor.ImplementationFactory != null) 257else if (descriptor.IsKeyedService && descriptor.KeyedImplementationFactory != null)
ServiceLookup\CallSiteFactory.cs (2)
386else if (!descriptor.IsKeyedService && descriptor.ImplementationFactory != null) 390else if (descriptor.IsKeyedService && descriptor.KeyedImplementationFactory != null)
ServiceLookup\ServiceDescriptorExtensions.cs (3)
19return serviceDescriptor.IsKeyedService 26return serviceDescriptor.IsKeyedService 34return 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. 162public 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. 176if (!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. 193public 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. 206if (!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. 223public 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. 236if (!IsKeyedService) 254if (IsKeyedService) 1020if (IsKeyedService)