private void GenClass(TypeDescription t, CsFile target) { Console.WriteLine ("create class " + t.Name); target.emit (1, "public class " + t.Name + " {"); foreach (MemberDescription m in t.Members) GenMember (m, target); target.emit (1, "}"); target.emit (1, ""); }
private void GenCs(IEnumerable<TypeDescription> source, CsFile target) { target.emit (0, "using System;"); target.emit (0, "using System.Collections.Generic;"); target.emit (0, "using TkMeta.TkBaseTypes;"); target.emit (0, ""); target.emit (0, "namespace TkMeta"); target.emit (0, "{"); target.emit (0, ""); GenClasses (source, target); target.emit (0, ""); target.emit (0, "}"); target.flush (); }
private void GenMember(MemberDescription m, CsFile target) { target.emit (2, "public " + OfCardinality (m) + ResolveKeywords (m.Name) + " { get; set; }"); }