Example #1
0
 IPackageRepository CreateRepositoryIgnoringFailures(string packageSource)
 {
     try {
         return(CreateRepository(packageSource));
     } catch (Exception ex) {
         // Deliberately caching the failing package source so the
         // AggregateRepository only reports its failure once.
         var repository = new FailingPackageRepository(packageSource, ex);
         repositories.TryAdd(packageSource, repository);
         return(repository);
     }
 }
		IPackageRepository CreateRepositoryIgnoringFailures (string packageSource)
		{
			try {
				return CreateRepository (packageSource);
			} catch (Exception ex) {
				// Deliberately caching the failing package source so the
				// AggregateRepository only reports its failure once.
				var repository = new FailingPackageRepository (packageSource, ex);
				repositories.TryAdd(packageSource, repository);
				return repository;
			}
		}