-
-
Save johnazariah/2e0585ce0fc89a8e2ca8 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 Program | |
{ | |
public void Main() | |
{ | |
var solution = new Directory | |
{ | |
["global.json"] = new JObject | |
{ | |
["projects"] = new JArray { "src", "test" } | |
}, | |
["src"] = new Directory | |
{ | |
["MyProject"] = new Directory | |
{ | |
["Startup.cs"] = "public class Startup { }", | |
["project.json"] = new JObject | |
{ | |
["dependencies"] = new JObject | |
{ | |
["Newtonsoft.Json"] = "6.0.6" | |
}, | |
["frameworks"] = new JObject | |
{ | |
["dnx451"] = new JObject { } | |
} | |
} | |
} | |
} | |
}; | |
} | |
} |
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
type Solution = | |
| SolutionItems of SolutionItem seq | |
and SolutionItem = | |
| GlobalSettings of GlobalSettings | |
| Projects of (string * Project) seq | |
and GlobalSettings = | |
| ProjectNames of string seq | |
and Project = | |
| ProjectDirectories of (string * ProjectDirectory) seq | |
and ProjectDirectory = | |
| ProjectItems of (string * ProjectItem) seq | |
and ProjectItem = | |
| ProjectSettings of (string * ProjectSettingItem) seq | |
| SourceFile of string | |
and ProjectSettingItem = | |
| ProjectDependencies of (string * (ProjectDependency option)) seq | |
| ProjectFrameworks of (string * (ProjectFramework option)) seq | |
and ProjectDependency = | |
| DependencyVersion of string | |
and ProjectFramework = | |
| FrameworkVersion of string | |
let solution = | |
SolutionItems [ | |
GlobalSettings (ProjectNames ["src"; "test"]) | |
Projects [ | |
("src", ProjectDirectories [ | |
("MyProject", ProjectItems [ | |
("Startup.cs", SourceFile ("public class Startup { }")) | |
("project.json", ProjectSettings [ | |
("dependencies", ProjectDependencies [ | |
("Newtonsoft.Json", Some (DependencyVersion "6.0.6")) | |
]) | |
("frameworks", ProjectFrameworks [ | |
("dnx451", None) | |
]) | |
]) | |
]) | |
]) | |
] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment