Пример #1
0
 public SlackRequestHandler(
     IEnumerable <ISlackRequestListener> requestListeners,
     ISlackHandlerFactory handlerFactory,
     SlackJsonSettings jsonSettings,
     ILogger logger)
 {
     _requestListeners = requestListeners;
     _handlerFactory   = handlerFactory;
     _jsonSettings     = jsonSettings;
     _log = logger.ForSource <SlackRequestHandler>();
 }
Пример #2
0
        public SlackSocketModeClient(
            ICoreSocketModeClient socket,
            SlackJsonSettings jsonSettings,
            ISlackRequestListener requestListener,
            ISlackHandlerFactory handlerFactory)
        {
            _socket          = socket;
            _jsonSettings    = jsonSettings;
            _requestListener = requestListener;
            _handlerFactory  = handlerFactory;

            _requestSubscription = _socket.Messages
                                   .OfType <SocketEnvelope>()
                                   .SelectMany(HandleRequest)
                                   .Subscribe();
        }
Пример #3
0
        public SlackSocketModeClient(
            ICoreSocketModeClient socket,
            SlackJsonSettings jsonSettings,
            IEnumerable <ISlackRequestListener> requestListeners,
            ISlackHandlerFactory handlerFactory,
            ILogger logger)
        {
            _socket           = socket;
            _jsonSettings     = jsonSettings;
            _requestListeners = requestListeners;
            _handlerFactory   = handlerFactory;
            _log = logger.ForSource <SlackSocketModeClient>();

            _requestSubscription = _socket.Messages
                                   .OfType <SocketEnvelope>()
                                   .SelectMany(HandleRequest)
                                   .Subscribe();
        }