Exemple #1
0
 public ApplicationController(IEventAggregator eventAggregator,
                              IConvenientWindowManager windowManager,
                              IWindowController windowController,
                              IGameMonitor gameMonitor,
                              IPlayerNotifier playerNotifier,
                              ISplunkLogger splunkLogger,
                              IKataFilesMonitor kataFilesMonitor,
                              IReminderTimer reminderTimer,
                              IMonitorTimer monitorTimer)
 {
     if (eventAggregator == null)
     {
         throw new ArgumentNullException(nameof(eventAggregator));
     }
     if (windowManager == null)
     {
         throw new ArgumentNullException(nameof(windowManager));
     }
     if (windowController == null)
     {
         throw new ArgumentNullException(nameof(windowController));
     }
     if (gameMonitor == null)
     {
         throw new ArgumentNullException(nameof(gameMonitor));
     }
     if (playerNotifier == null)
     {
         throw new ArgumentNullException(nameof(playerNotifier));
     }
     if (splunkLogger == null)
     {
         throw new ArgumentNullException(nameof(splunkLogger));
     }
     if (kataFilesMonitor == null)
     {
         throw new ArgumentNullException(nameof(kataFilesMonitor));
     }
     if (reminderTimer == null)
     {
         throw new ArgumentNullException(nameof(reminderTimer));
     }
     if (monitorTimer == null)
     {
         throw new ArgumentNullException(nameof(monitorTimer));
     }
     _eventAggregator  = eventAggregator;
     _windowManager    = windowManager;
     _windowController = windowController;
     _gameMonitor      = gameMonitor;
     _playerNotifier   = playerNotifier;
     _splunkLogger     = splunkLogger;
     _kataFilesMonitor = kataFilesMonitor;
     _reminderTimer    = reminderTimer;
     _monitorTimer     = monitorTimer;
     eventAggregator.Subscribe(this);
 }
 private IApplicationController Create(
     IEventAggregator eventAggregator       = null,
     IConvenientWindowManager windowManager = null,
     IWindowController windowController     = null,
     IGameMonitor gameMonitor           = null,
     IPlayerNotifier playerNotifier     = null,
     ISplunkLogger splunkLogger         = null,
     IKataFilesMonitor kataFilesMonitor = null,
     IReminderTimer reminderTimer       = null,
     IMonitorTimer monitorTimer         = null)
 {
     return(new ApplicationController(
                eventAggregator ?? Substitute.For <IEventAggregator>(),
                windowManager ?? Substitute.For <IConvenientWindowManager>(),
                windowController ?? Substitute.For <IWindowController>(),
                gameMonitor ?? Substitute.For <IGameMonitor>(),
                playerNotifier ?? Substitute.For <IPlayerNotifier>(),
                splunkLogger ?? Substitute.For <ISplunkLogger>(),
                kataFilesMonitor ?? Substitute.For <IKataFilesMonitor>(),
                reminderTimer ?? Substitute.For <IReminderTimer>(),
                monitorTimer ?? Substitute.For <IMonitorTimer>()
                ));
 }
Exemple #3
0
 private void StartFileMonitor()
 {
     _kataFilesMonitor = KataMonitorFactory.GenerateKataFilesMonitor(_playerNotifier, SettingsManager.Instance,
                                                                     new AnalysisRunnerFactory(), _kataraiApp);
     _kataFilesMonitor.Start();
 }