Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
interface Microsoft.​Extensions.​DependencyInjection.​IServiceProviderIsKeyedService
Assembly: Microsoft.Extensions.DependencyInjection.Abstractions
Implemented Interfaces
Provides methods to determine if the specified type with the specified service key is available from the <see cref="T:System.IServiceProvider" /> .
Methods
bool
IsKeyedService​(System.​Type serviceType,
object serviceKey)
Determines if the specified service type with the specified service key is available from the
<see cref="T:System.IServiceProvider" /> .
Returns true if the specified service is a available, false if it is not.
serviceType
An object that specifies the type of service object to test.
serviceKey
The <see cref="P:Microsoft.Extensions.DependencyInjection.ServiceDescriptor.ServiceKey" /> of the service.