You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Admin.Core.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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|