예제 #1
0
        public static NamespaceBlock Create(string namespaceName)
        {
            NamespaceBlock newNamespace = new NamespaceBlock();

            newNamespace.Name = namespaceName;
            return(newNamespace);
        }
예제 #2
0
 public override void Visit(NamespaceBlock block)
 {
     WriteIndent();
     WriteLine("namespace " + block.Name);
     StartBlock();
     VisitContainer(block.VMembers);
     EndBlock();
 }
예제 #3
0
 public void AddNamespace(NamespaceBlock newNamespace)
 {
     using (Transaction.Create(Root.ActionManager))
     {
         EnsureNonEmptyContainer();
         this.Add(newNamespace, new EmptyNamespaceBlock());
     }
 }
예제 #4
0
        public NamespaceBlock AddNamespace(string namespaceName)
        {
            NamespaceBlock newNamespace = new NamespaceBlock();

            newNamespace.Name = namespaceName;
            AddNamespace(newNamespace);
            return(newNamespace);
        }
예제 #5
0
 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(), "");
     }
 }
예제 #6
0
        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();
        }
예제 #7
0
 public virtual void Visit(NamespaceBlock block)
 {
 }
예제 #8
0
 public override void Visit(NamespaceBlock block)
 {
 }
예제 #9
0
 public override void Visit(NamespaceBlock block)
 {
 }
예제 #10
0
 public static NamespaceBlock Create(string namespaceName)
 {
     NamespaceBlock newNamespace = new NamespaceBlock();
     newNamespace.Name = namespaceName;
     return newNamespace;
 }
예제 #11
0
 public void AddNamespace(NamespaceBlock newNamespace)
 {
     using (Transaction.Create(Root.ActionManager))
     {
         EnsureNonEmptyContainer();
         this.Add(newNamespace, new EmptyNamespaceBlock());
     }
 }
예제 #12
0
 public NamespaceBlock AddNamespace(string namespaceName)
 {
     NamespaceBlock newNamespace = new NamespaceBlock();
     newNamespace.Name = namespaceName;
     AddNamespace(newNamespace);
     return newNamespace;
 }
예제 #13
0
 public override void Visit(NamespaceBlock block)
 {
     WriteIndent();
     WriteLine("namespace " + block.Name);
     StartBlock();
     VisitContainer(block.VMembers);
     EndBlock();
 }
예제 #14
0
		public virtual void Visit(NamespaceBlock block)
		{

		}