using Microsoft.Extensions.DependencyInjection; using System; namespace Binance.TradeRobot.Common.DI { [AttributeUsage(AttributeTargets.Class)] public class BatchRegistrationAttribute : Attribute { public ServiceLifetime ServiceLifetime; public RegistrationType RegistrationType; /// /// 批量注册特性 /// /// 生命周期 /// 注册类型 public BatchRegistrationAttribute(ServiceLifetime serviceLifetime, RegistrationType registrationType) { this.ServiceLifetime = serviceLifetime; this.RegistrationType = registrationType; } } /// /// 注册类型 /// public enum RegistrationType { Interface, Self } }