init
This commit is contained in:
29
DouyinApi.EventBus/EventBusSubscriptions/SubscriptionInfo.cs
Normal file
29
DouyinApi.EventBus/EventBusSubscriptions/SubscriptionInfo.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
|
||||
namespace DouyinApi.EventBus
|
||||
{
|
||||
/// <summary>
|
||||
/// 订阅信息模型
|
||||
/// </summary>
|
||||
public class SubscriptionInfo
|
||||
{
|
||||
public bool IsDynamic { get; }
|
||||
public Type HandlerType { get; }
|
||||
|
||||
private SubscriptionInfo(bool isDynamic, Type handlerType)
|
||||
{
|
||||
IsDynamic = isDynamic;
|
||||
HandlerType = handlerType;
|
||||
}
|
||||
|
||||
public static SubscriptionInfo Dynamic(Type handlerType)
|
||||
{
|
||||
return new SubscriptionInfo(true, handlerType);
|
||||
}
|
||||
public static SubscriptionInfo Typed(Type handlerType)
|
||||
{
|
||||
return new SubscriptionInfo(false, handlerType);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user