public async Task <IEnumerable <SyncManifest> > GetSyncManifestsAsync()
        {
            var syncManifestPath = Directory.EnumerateFiles(m_DataFolder, "*.manifest").FirstOrDefault();
            var syncManifest     = await PlayerFile.LoadManifestAsync(syncManifestPath);

            return(new [] { syncManifest });
        }
Esempio n. 2
0
        async Task <IEnumerable <SyncManifest> > GetSyncManifestsAsync()
        {
            var result = new List <SyncManifest>();

            foreach (var manifestFile in Directory.EnumerateFiles(ProjectFolder, "*.manifest", SearchOption.AllDirectories))
            {
                if (manifestFile == null)
                {
                    continue;
                }

                var syncManifest = await PlayerFile.LoadManifestAsync(manifestFile);

                result.Add(syncManifest);
            }

            return(result);
        }
        async Task <IEnumerable <SyncManifest> > LoadStreamSourcesAsync(UnityProject project)
        {
            var folder = m_Storage.GetProjectFolder(project);

            var result = new List <SyncManifest>();

            foreach (var manifestFile in Directory.EnumerateFiles(folder, "*.manifest", SearchOption.AllDirectories))
            {
                if (manifestFile == null)
                {
                    continue;
                }

                var syncManifest = await PlayerFile.LoadManifestAsync(manifestFile);

                result.Add(syncManifest);
            }

            return(result);
        }
 public async Task <IEnumerable <SyncManifest> > GetSyncManifestsAsync(CancellationToken token)
 {
     return(Task.WhenAll(Directory.EnumerateFiles(m_DataFolder, "*.manifest", SearchOption.AllDirectories).ToList().Select(async x => await PlayerFile.LoadManifestAsync(x))).Result);
 }