Beispiel #1
0
            /// <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);
            }
Beispiel #2
0
    static CodeGenerate()
    {
        Directory.CreateDirectory(Path.GetDirectoryName(outputFileName));

        Sample sample = new Sample();

        sample.AddFields();
        sample.AddProperties();
        sample.AddMethod();
        sample.AddConstructor();
        sample.AddEntryPoint();
        sample.GenerateCSharpCode(outputFileName);
    }