Пример #1
0
        public async Task DownloadFile(CancellationToken token)
        {
            if (!SetsFile.IsFile())
            {
                await Downloader.DownloadMtgjson(token);
            }

            IsDownloadComplete.Signal();
        }
Пример #2
0
        public void LoadFile()
        {
            _defaultSetsContent = SetsFile.ReadAllBytes();

            _customSetContents = CustomSetCodes
                                 .Select(code => AppDir.Data.Join("custom_sets", code + ".json").ReadAllBytes())
                                 .ToArray();

            Patch = JsonConvert.DeserializeObject <Patch>(PatchFile.ReadAllText());
            Patch.IgnoreCase();

            IsFileLoadingComplete.Signal();
        }