Example #1
0
        private async Task RunPatcherAsync(Progress <PatchProgress> progress)
        {
            gamePatcher.Initialize(gamePatcher.GetGameDirectory());
            AssertPatcherError("Unable to create game directory. Check permissions or change the target directory.");

            gamePatcher.GetPatchManifest();
            AssertPatcherError("Could not retrieve patch manifest. The game has not been updated.");

            gamePatcher.CheckGameFiles(progress);

            await gamePatcher.DownloadGameFiles(progress);

            AssertPatcherError("An error occurred downloading update files. The game has not been updated.");

            gamePatcher.PatchGameFiles(progress);
            AssertPatcherError("An error occurred applying game patches. The game has not been updated.");
        }