Created
February 24, 2023 13:16
-
-
Save iBener/24286164587de9c100d1f8444cb86ea6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Compiler | |
{ | |
/// <summary> | |
/// Compile all the projects of the solution | |
/// </summary> | |
public void Compile(Solution solution) | |
{ | |
foreach (var project in solution.Projects) | |
{ | |
Compile(project); | |
} | |
} | |
/// <summary> | |
/// Compile the project and its dependencies. It also recursively compile all the dependencies of the project | |
/// </summary> | |
public void Compile(Project project) | |
{ | |
foreach (var dependencyProject in project.ProjectDependencies) | |
{ | |
Compile(dependencyProject); | |
} | |
if (!project.IsBuild) | |
{ | |
project.Build(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment