Skip to content

Instantly share code, notes, and snippets.

@davidfowl
Created May 19, 2015 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • 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