Пример #1
0
        public SlackConnectionManager(ISlackConfigGroup slackConfigGroup,
                                      ISlackRtmClient slackRtmClient,
                                      ISlackWebClient slackWebClient,
                                      ISlackConnectionEventPublisher slackConnectionEventPublisher,
                                      IBashiLogger log)
        {
            botToken            = slackConfigGroup.BotToken;
            this.slackRtmClient = slackRtmClient;
            this.slackWebClient = slackWebClient;
            this.log            = log;

            slackConnectionEventPublisher.RtmDisconnected += (s, e) => Connect();
        }
Пример #2
0
 public SlackRtmClient(IWebSocketManager webSocketManager,
                       ISlackConfigGroup slackConfigGroup,
                       IRtmRequestFactory rtmRequestFactory,
                       IRtmResponseFactory rtmResponseFactory,
                       ISlackRtmEventPublisher slackRtmEventPublisher,
                       ISlackConnectionEventPublisher slackConnectionEventPublisher,
                       IBashiLogger log)
 {
     pingTimeout                        = slackConfigGroup.PingTimeout;
     this.webSocketManager              = webSocketManager;
     this.rtmRequestFactory             = rtmRequestFactory;
     this.rtmResponseFactory            = rtmResponseFactory;
     this.slackRtmEventPublisher        = slackRtmEventPublisher;
     this.slackConnectionEventPublisher = slackConnectionEventPublisher;
     this.log = log;
 }