/// <summary>
 /// Add all restorable projects to the restore list.
 /// This is the behavior for --recursive
 /// </summary>
 public static void AddAllProjectsForRestore(DependencyGraphSpec spec)
 {
     // Add everything from projects except for packages.config and unknown project types
     foreach (var project in spec.Projects
              .Where(project => RestorableTypes.Contains(project.RestoreMetadata.ProjectStyle)))
     {
         spec.AddRestore(project.RestoreMetadata.ProjectUniqueName);
     }
 }
Exemple #2
0
 /// <summary>
 /// Determines if the specified <see cref="PackageSpec" /> supports restore.
 /// </summary>
 /// <param name="packageSpec">A <see cref="PackageSpec" /> for a project.</param>
 /// <returns><code>true</code> if the project supports restore, otherwise <code>false</code>.</returns>
 public static bool DoesProjectSupportRestore(PackageSpec packageSpec)
 {
     return(RestorableTypes.Contains(packageSpec.RestoreMetadata.ProjectStyle));
 }