Пример #1
0
 public FOServerQuery(FOServerJson json, ILogger logger)
 {
     this.logger = logger;
     this.json = json;
     this.deserializer = new FOJsonDeserializer();
     this.Update();
 }
Пример #2
0
        void bw_DoWork(object sender, DoWorkEventArgs e)
        {
            JsonFetcher jsonFetch = new JsonFetcher(new NLogWrapper("FOQuery"));
            FOJsonDeserializer jsonDeserialize = new FOJsonDeserializer();

            this.view.UpdateStatusBar("Downloading data...");

            var jsonNode = jsonFetch.DownloadJson(this.settings.InstallUrl);
            this.installHandler = new InstallHandler(jsonDeserialize.GetInstallData(jsonNode), settings.Games, settings.Dependencies);
            this.logger.Debug("Installhandler initialized.");
            this.logoManager = new LogoManager(this.settings.Paths.Logos, this.settings.LogoUrl);
            this.logger.Debug("Logos initialized.");
            this.serverManager = new ServerManager(
                new FOServerJson(settings.ConfigUrl, settings.StatusUrl, settings.CombinedUrl, new NLogWrapper("FOQuery")),
                this.installHandler);
            this.logger.Debug("Servermanager initialized.");
            this.VerifyInstalledGames();
            this.logger.Debug("Verified installed games.");
            this.view.UpdateStatusBar("Updating game list...");
            this.UpdateGameList();
            this.logger.Debug("Games updated.");
        }