/// <summary> /// Create the CodeDOM graph and generate the code. /// </summary> static void Main_Example() { Sample sample = new Sample(); sample.AddFields(); sample.AddProperties(); sample.AddMethod(); sample.AddConstructor(); sample.AddEntryPoint(); sample.GenerateCSharpCode(outputFileName); }
static CodeGenerate() { Directory.CreateDirectory(Path.GetDirectoryName(outputFileName)); Sample sample = new Sample(); sample.AddFields(); sample.AddProperties(); sample.AddMethod(); sample.AddConstructor(); sample.AddEntryPoint(); sample.GenerateCSharpCode(outputFileName); }