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); }
protected override void OnStop() { _supportManager.EndListening(); _supportManager = null; }