public void EndListening()
        {
            _ewsMailWatcher.EndListening();
            _ewsMailWatcher = null;

            //dispose of trello.
            _settingsService = null;
            _slackService = null;
        }
Exemplo n.º 2
0
        public Service1()
        {
            InitializeComponent();

            var settingsService = new SettingsService();
            var settings = settingsService.GetSettinngs();

            var ewsMailWatcher = new EwsMailWatcher(settings.EwsSettings, settings.TrelloSettings.BoardForwardingEmailAddress);
            var slackService = new SlackNotificationService();

            _supportManager = new SupportManager(ewsMailWatcher, slackService, settingsService);
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            var settingsService = new SettingsService();
            _supportChannelId = settingsService.GetSettinngs().SlackSettings.SupportChannelId;

            var watcher = new EwsMailWatcher(settingsService.GetSettinngs().EwsSettings, settingsService.GetSettinngs().TrelloSettings.BoardForwardingEmailAddress);

            watcher.BeginListening(MailRecieved);

            Console.WriteLine("press any key to close app down");
            Console.ReadKey();

            watcher.EndListening();
        }
 public SupportManager(EwsMailWatcher ewsMailWatcher, SlackNotificationService slackService, SettingsService settingsService)
 {
     _ewsMailWatcher = ewsMailWatcher;
     _slackService = slackService;
     _settingsService = settingsService;
 }