Esempio n. 1
0
        /// <summary>
        /// Save all manifests we can found.
        /// </summary>
        public async Task SaveAllManifests()
        {
            var manifests = await SaveLatestAssetManifest();

            var tasks = new List <Task>
            {
                SaveLatestBundleManifest(), SaveMovieManifest(), SaveLowMovieManifest(), SaveSoundManifest()
            };

            tasks.AddRange(ManifestItem
                           .ParseAll(manifests)
                           .Select(assetManifest =>
                                   SaveManifest(
                                       _config.ManifestPath() + assetManifest.Uri,
                                       CombinePath(assetManifest.Uri),
                                       assetManifest.Md5)
                                   )
                           );

            Task.WaitAll(tasks.ToArray());
            tasks.Clear();
        }
Esempio n. 2
0
        /// <summary>
        /// Save all manifests we can found.
        /// </summary>
        public async Task SaveAllManifests(int maxTry = -1)
        {
            var manifests = await SaveLatestAssetManifest(maxTry);

            var tasks = new List <Task>
            {
                SaveLatestBundleManifest(maxTry), SaveMovieManifest(), SaveLowMovieManifest(), SaveSoundManifest()
            };

            tasks.AddRange(ManifestItem
                           .ParseAll(manifests)
                           .Select(assetManifest =>
                                   SaveManifestIfNotExist(
                                       _config.AssetEndpoint(),
                                       assetManifest.Uri,
                                       assetManifest.Uri,
                                       assetManifest.Md5)
                                   )
                           );

            Task.WaitAll(tasks.ToArray());
            tasks.Clear();
        }