IServiceProviderIsKeyedService
Provides methods to determine if the specified type with the specified service key is available
from the IServiceProvider.
using System;
using System.Runtime.CompilerServices;
namespace Microsoft.Extensions.DependencyInjection
{
public interface IServiceProviderIsKeyedService : IServiceProviderIsService
{
[System.Runtime.CompilerServices.NullableContext(1)]
bool IsKeyedService(Type serviceType, [System.Runtime.CompilerServices.Nullable(2)] object serviceKey);
}
}