Ejemplo n.º 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);
            }
Ejemplo n.º 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);
    }