Exemplo n.º 1
0
            private static async Task <CustomRepo[]> GetRepositories(IHaveRepositories col)
            {
                var repositories =
                    col.Repositories.Select(r => new CustomRepo(CustomRepo.GetRepoUri(new Uri(r)))).ToArray();

                foreach (var r in repositories)
                {
                    try {
                        await r.Load(SyncEvilGlobal.StringDownloader, r.Uri).ConfigureAwait(false);
                    } catch (Exception ex) {
                        MainLog.Logger.FormattedWarnException(ex, "Error while processing repo");
                    }
                }

                return(repositories.Where(x => x.Loaded).ToArray());
            }
            private static async Task<CustomRepo[]> GetRepositories(IHaveRepositories col) {
                var repositories =
                    col.Repositories.Select(r => new CustomRepo(CustomRepo.GetRepoUri(new Uri(r)))).ToArray();
                foreach (var r in repositories) {
                    try {
                        await r.Load(SyncEvilGlobal.StringDownloader, r.Uri).ConfigureAwait(false);
                    } catch (Exception ex) {
                        MainLog.Logger.FormattedWarnException(ex, "Error while processing repo");
                    }
                }

                return repositories.Where(x => x.Loaded).ToArray();
            }