Exemplo n.º 1
0
 public RestoreSummary(
     RestoreResult result,
     string inputPath,
     IEnumerable <string> configFiles,
     IEnumerable <SourceRepository> sourceRepositories,
     IEnumerable <RestoreLogMessage> errors)
 {
     Success     = result.Success;
     NoOpRestore = result is NoOpRestoreResult;
     InputPath   = inputPath;
     ConfigFiles = configFiles.AsList().AsReadOnly();
     FeedsUsed   = sourceRepositories
                   .Select(source => source.PackageSource.Source)
                   .ToList()
                   .AsReadOnly();
     InstallCount = result.GetAllInstalled().Count;
     Errors       = errors.ToArray();
 }
Exemplo n.º 2
0
 public RestoreSummary(
     RestoreResult result,
     string inputPath,
     ISettings settings,
     IEnumerable <SourceRepository> sourceRepositories,
     IEnumerable <string> errors)
 {
     Success     = result.Success;
     InputPath   = inputPath;
     ConfigFiles = settings
                   .Priority
                   .Select(childSettings => Path.Combine(childSettings.Root, childSettings.FileName))
                   .ToList()
                   .AsReadOnly();
     FeedsUsed = sourceRepositories
                 .Select(source => source.PackageSource.Source)
                 .ToList()
                 .AsReadOnly();
     InstallCount = result.GetAllInstalled().Count;
     Errors       = errors.ToArray();
 }