Skip to content

Instantly share code, notes, and snippets.

@davidfowl
Created May 19, 2015 06:15
Show Gist options
  • Save davidfowl/0fc85f3215adf4eab294 to your computer and use it in GitHub Desktop.
Save davidfowl/0fc85f3215adf4eab294 to your computer and use it in GitHub Desktop.
project structure DSL in C# 6.0
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 { }
}
}
}
}
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment