private void Connect() { if (!_connected) { lock (_connectLock) { if (!_connected) { _bot = SlackBot.Connect(_token).Result; _bot.RegisterHandler(this); _connected = true; OnConnected(); } } } }
public SlackBotConnector(String name) { adress = new EndpointAddress("net.pipe://localhost/SlackPipe" + name); ChannelFactory<ISlackBot> factory = new ChannelFactory<ISlackBot>(new NetNamedPipeBinding(), adress); client = factory.CreateChannel(); }
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)); }