Exemple #1
0
 private static IEnumerable<string> IndirectDependencies(Build build,
                                                         ImmutableDictionary<string, Package> allPackages)
 {
     return build.Dependencies.Values
                 .SelectMany(x => allPackages[x.VersionId.Id]
                                 .Dependencies
                                 .Select(y => y.Id));
 }
Exemple #2
0
 private static void WriteDependencies(BuildType buildType,
                                       Build build,
                                       ImmutableDictionary<string, Package> allPackages)
 {
     if (build.CreatedPackages.Any())
         foreach (Package package in build.CreatedPackages.Values)
             foreach (string dependency in package.Dependencies
                                                  .Select(x => x.Id).Distinct())
                 Console.WriteLine(@"  ""{0}"" -> ""{1}"";", package.VersionId.Id, dependency);
     else
         foreach (
             string dependency in
                 build.Dependencies.Select(x => x.Key.Id)
                      .Distinct()
                      .Except(IndirectDependencies(build, allPackages)))
             Console.WriteLine(@"  ""{0}"" -> ""{1}"";", buildType.Id, dependency);
 }