Esempio n. 1
0
 public static ClassBlock Create(string className, string classModifiers)
 {
     ClassBlock newClass = new ClassBlock();
     newClass.Name = className;
     newClass.Modifiers.SetMany(classModifiers);
     return newClass;
 }
Esempio n. 2
0
        public static ClassBlock Create(string className, string classModifiers)
        {
            ClassBlock newClass = new ClassBlock();

            newClass.Name = className;
            newClass.Modifiers.SetMany(classModifiers);
            return(newClass);
        }
 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(), "");
     }
 }
Esempio n. 4
0
        public ClassBlock AddClass(string className, string modifiers)
        {
            ClassBlock newClass = new ClassBlock();

            newClass.Name = className;
            newClass.Modifiers.SetMany(modifiers);
            AddClass(newClass);
            return(newClass);
        }
Esempio n. 5
0
 public override void Visit(ClassBlock block)
 {
     WriteIndent();
     Write(block.Modifiers);
     WriteLine("class " + block.Name);
     StartBlock();
     VisitContainer(block.VMembers);
     EndBlock();
 }
        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();
        }
Esempio n. 7
0
 public virtual void Visit(ClassBlock block)
 {
 }
Esempio n. 8
0
 public override void Visit(ClassBlock block)
 {
 }
Esempio n. 9
0
 public void AddClass(ClassBlock newClass)
 {
     this.VMembers.Add(newClass, new EmptyNamespaceBlock());
 }
Esempio n. 10
0
 public override void Visit(ClassBlock block)
 {
 }
Esempio n. 11
0
 public ClassBlock AddClass(string className, string modifiers)
 {
     ClassBlock newClass = new ClassBlock();
     newClass.Name = className;
     newClass.Modifiers.SetMany(modifiers);
     AddClass(newClass);
     return newClass;
 }
Esempio n. 12
0
 public void AddClass(ClassBlock newClass)
 {
     this.VMembers.Add(newClass, new EmptyNamespaceBlock());
 }
Esempio n. 13
0
 public override void Visit(ClassBlock block)
 {
     WriteIndent();
     Write(block.Modifiers);
     WriteLine("class " + block.Name);
     StartBlock();
     VisitContainer(block.VMembers);
     EndBlock();
 }
Esempio n. 14
0
		public virtual void Visit(ClassBlock block)
		{

		}