DocSpace-client/common/ASC.EventBus/SubscriptionInfo.cs

23 lines
653 B
C#

namespace ASC.EventBus;
public partial class InMemoryEventBusSubscriptionsManager : IEventBusSubscriptionsManager
{
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) =>
new SubscriptionInfo(true, handlerType);
public static SubscriptionInfo Typed(Type handlerType) =>
new SubscriptionInfo(false, handlerType);
}
}