Example #1
0
        static void Main(string[] args)
        {
            var bot = new SlackBot(ConfigurationManager.AppSettings["channel"],
                                   ConfigurationManager.AppSettings["botName"], ConfigurationManager.AppSettings["slackBotToken"],
                                   ConfigurationManager.AppSettings["iconUrl"]);

            INotifier notifier = new SlackNotifier(ConfigurationManager.AppSettings["slackApiUrl"], bot);
            var       user     = new User();

            user.notificationEvent += notifier.Send;
            while (true)
            {
                user.GetInfo(_server);

                Thread.Sleep(1000);
            }
        }
Example #2
0
 public SlackNotifier(string url, SlackBot bot)
 {
     this._slackApiUrl = url;
     this._slackBot    = bot;
 }