币安量化交易
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
888 B

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