예제 #1
0
 public TypedBlockActionHandler(IBlockActionHandler <TAction> handler) => _handler = handler;
예제 #2
0
 public static IAsyncBlockActionHandler ToBlockActionHandler(this IBlockActionHandler handler) =>
 new BlockActionHandlerAsyncWrapper(handler);
예제 #3
0
 public SlackServiceConfiguration RegisterBlockActionHandler <TAction>(IBlockActionHandler <TAction> handler)
     where TAction : BlockAction
 {
     return(RegisterBlockActionHandler(c => handler));
 }
예제 #4
0
 public static IAsyncBlockActionHandler ToBlockActionHandler <TAction>(this IBlockActionHandler <TAction> handler, string actionId) where TAction : BlockAction =>
 new SpecificBlockActionHandler(actionId, new TypedBlockActionHandler <TAction>(handler).ToBlockActionHandler());
예제 #5
0
 public static IAsyncBlockActionHandler ToBlockActionHandler <TAction>(this IBlockActionHandler <TAction> handler) where TAction : BlockAction =>
 new TypedBlockActionHandler <TAction>(handler).ToBlockActionHandler();
 public TConfig RegisterBlockActionHandler(IBlockActionHandler handler) =>
 RegisterAsyncBlockActionHandler(handler.ToBlockActionHandler());
예제 #7
0
 public BlockActionHandlerAsyncWrapper(IBlockActionHandler syncHandler) => _syncHandler = syncHandler;
 public TConfig RegisterBlockActionHandler <TAction>(IBlockActionHandler <TAction> handler) where TAction : BlockAction =>
 RegisterAsyncBlockActionHandler(handler.ToBlockActionHandler());
 public TConfig RegisterBlockActionHandler <TAction>(string actionId, IBlockActionHandler <TAction> handler) where TAction : BlockAction =>
 RegisterAsyncBlockActionHandler(handler.ToBlockActionHandler(actionId));
예제 #10
0
 public void AddHandler <TAction>(IBlockActionHandler <TAction> handler) where TAction : BlockAction => _slackBlockActions.AddHandler(handler);
예제 #11
0
 public void AddHandler <TAction>(IBlockActionHandler <TAction> handler) where TAction : BlockAction => _handlers.Add(handler);
예제 #12
0
 public SpecificBlockActionHandler(string actionId, IBlockActionHandler <TAction> handler)
 {
     _actionId = actionId;
     _handler  = handler;
 }