public Manager(HSReplayNetConfig config = null, IGameDataProvider gameDataProvider = null) { gameDataProvider = gameDataProvider ?? new HearthMirrorDataProvider(); LogReader = new LogReader(new List <LogWatcherData> { LogWatcherConfigs.Power, LogWatcherConfigs.LoadingScreen, LogWatcherConfigs.Decks, LogWatcherConfigs.Arena, LogWatcherConfigs.Rachelle }); Game = new Game(gameDataProvider); Game.HearthstoneExited += () => LogReader.Stop().Forget(); _gameEventManager = new GameEventManager(Game, LogReader, gameDataProvider); _procWatcher = new ProcessWatcher("Hearthstone"); _procWatcher.OnStart += ProcessWatcher_OnStart; _procWatcher.OnExit += ProcessWatcher_OnExit; LogConfigWatcher.Start(); LogConfigUpdater.LogConfigUpdated += Game.OnHearthstoneRestartRequired; LogConfigUpdater.LogConfigUpdateFailed += Game.OnLogConfigError; if (config != null) { HSReplayNet = new HSReplayNet(config); _hsReplayNetEventManager = new HSReplayNetEventManager(HSReplayNet, Game); HSReplayNet.UpdateAccount().Forget(); } }
internal TwitchDataManager(OAuthWrapper oauth, HSReplayNetConfig config) { _oauth = oauth; _config = config; }