ServiceKeyAttribute
ServiceKeyAttribute can be specified on a parameter to inject the key that was used for
registration/resolution.
using System;
namespace Microsoft.Extensions.DependencyInjection
{
[AttributeUsage(AttributeTargets.Parameter)]
public class ServiceKeyAttribute : Attribute
{
}
}