public static NamespaceBlock Create(string namespaceName) { NamespaceBlock newNamespace = new NamespaceBlock(); newNamespace.Name = namespaceName; return(newNamespace); }
public override void Visit(NamespaceBlock block) { WriteIndent(); WriteLine("namespace " + block.Name); StartBlock(); VisitContainer(block.VMembers); EndBlock(); }
public void AddNamespace(NamespaceBlock newNamespace) { using (Transaction.Create(Root.ActionManager)) { EnsureNonEmptyContainer(); this.Add(newNamespace, new EmptyNamespaceBlock()); } }
public NamespaceBlock AddNamespace(string namespaceName) { NamespaceBlock newNamespace = new NamespaceBlock(); newNamespace.Name = namespaceName; AddNamespace(newNamespace); return(newNamespace); }
private void AddNamespaces(int howMany) { for (int i = 0; i < howMany; i++) { NamespaceBlock n = CodeUnit.AddNamespace("namespace " + i.ToString()); ClassBlock c1 = n.AddClass("class " + i.ToString(), "public"); ClassBlock c2 = n.AddClass("class (2) " + i.ToString(), ""); } }
private void HelloWorld() { using (new Redrawer(CodeUnit)) using (Transaction.Create(CodeUnit.ActionManager)) { CodeUnit.AddUsings( "System", "System.Collections.Generic", "System.Text" ); NamespaceBlock n = CodeUnit.AddNamespace("GuiLabs.Editor.Test"); ClassBlock c = n.AddClass("Program", "public static"); MethodBlock m = c.AddMethod("Main", "public static", "void"); m.VMembers.Add(new ForeachBlock()); //BlockStatementBlock b = new BlockStatementBlock(); //b.Add(new ForeachBlock()); //m.VMembers = b; // AddEnum(n); // AddInterface(n); } DisplayContextHelp(); }
public virtual void Visit(NamespaceBlock block) { }
public override void Visit(NamespaceBlock block) { }
public static NamespaceBlock Create(string namespaceName) { NamespaceBlock newNamespace = new NamespaceBlock(); newNamespace.Name = namespaceName; return newNamespace; }
public NamespaceBlock AddNamespace(string namespaceName) { NamespaceBlock newNamespace = new NamespaceBlock(); newNamespace.Name = namespaceName; AddNamespace(newNamespace); return newNamespace; }