KeyedService
Provides static APIs for use with IKeyedServiceProvider.
using System.Runtime.CompilerServices;
namespace Microsoft.Extensions.DependencyInjection
{
[NullableContext(1)]
[Nullable(0)]
public static class KeyedService
{
private sealed class AnyKeyObj
{
public override string ToString()
{
return "*";
}
}
public static object AnyKey { get; } = new AnyKeyObj();
}
}