private void Connect()
 {
     if (!_connected)
     {
         lock (_connectLock)
         {
             if (!_connected)
             {
                 _bot = SlackBot.Connect(_token).Result;
                 _bot.RegisterHandler(this);
                 _connected = true;
                 OnConnected();
             }
         }
     }
 }
Beispiel #2
0
 public SlackBotConnector(String name)
 {
     adress = new EndpointAddress("net.pipe://localhost/SlackPipe" + name);
     ChannelFactory<ISlackBot> factory = new ChannelFactory<ISlackBot>(new NetNamedPipeBinding(), adress);
     client = factory.CreateChannel();
 }
Beispiel #3
0
 public SlackMessage(ISlackBot bot)
 {
     _bot = bot;
 }
 public bdaylistener()
 {
     this.slackBot = DependencyResolver.Current.GetService<ISlackBot>();
 }
 public IssueAddedNewReplyIntegrationEventHandler(ILogger <IssueAddedNewReplyIntegrationEventHandler> logger, ISubscriptionQueries subscriptionQueries, ISlackBot slackBot)
 {
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
     _subscriptionQueries = subscriptionQueries ?? throw new ArgumentNullException(nameof(subscriptionQueries));
     _slackBot            = slackBot ?? throw new ArgumentNullException(nameof(slackBot));
 }