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); }
public BattleCryPlugin() { var dllLocation = Helper.GetPluginDllLocation(); _soundFileDir = dllLocation + "\\AudioFiles\\"; var soundBoard = new SoundBoard(_soundFileDir); var configManager = new XmlConfigManager(); var cardSoundPicker = new ConfigCardSoundPicker(configManager, _soundFileDir + "cardsoundconfig.xml"); var playHandler = new PlayHandler(soundBoard, cardSoundPicker); _gameMonitor = new GameMonitor(playHandler); }
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>() )); }
public GameTrackViewModel(IGameMonitor gameMonitor) { gameMonitor.GameUpdated += HandleStatusUpdate; }
public static void UnbindEvents(this IGameMonitor _this, GameEvents evt) { var a = GameEventBinder <ContextType, IGameMonitor> .GetOrCreate(_this, evt); a.unbindEvents(); }