Exemplo n.º 1
0
 public ThreadWrangler(IDataActions dataActions, IApplicationSettings applicationSettings, IMonitorFactory monitorFactory, IMonitorJobActions monitorJobActions)
 {
     _dataActions              = dataActions;
     _applicationSettings      = applicationSettings;
     _monitorFactory           = monitorFactory;
     _monitorJobActions        = monitorJobActions;
     _manualResetEvent         = new ManualResetEvent(false);
     _theServiceShouldContinue = true;
 }
Exemplo n.º 2
0
 void LoadAppSettings()
 {
     try
     {
         _applicationSettings = new ApplicationSettings();
         _dataActions         = new DataActions(_applicationSettings);
         _timeActions         = new TimeActions();
         _emailActions        = new EmailActions(_applicationSettings);
         _monitorJobActions   = new MonitorJobActions(_timeActions, _applicationSettings);
         _monitorFactory      = new MonitorFactory(_emailActions, _timeActions);
     }
     catch (Exception ex)
     {
         Log.ErrorFormat("monitoryService was unable to create all the startup objects it needs to run. The exception was '{0}'", ex);
         throw;
     }
 }