Пример #1
0
        public static void EmitCode(Node root, ICodeGen gen, StringBuilder sb, string nspace, bool supportsGC, bool internalFile)
        {
            gen.EmitNamespace(sb, false, nspace);

            int level = 0;

            if (gen.SupportsNamespace())
            {
                level = 1;
            }

            if (internalFile)
            {
                gen.EmitSerialBase(sb, level, supportsGC);
            }

            foreach (Node n in root.childNodes)
            {
                gen.EmitNode(n, sb, level);
            }

            gen.EmitNamespace(sb, true, nspace);
        }
Пример #2
0
        public static void EmitCode(Node root, ICodeGen gen, StringBuilder sb, string nspace, bool supportsGC, bool internalFile )
        {
            gen.EmitNamespace(sb, false, nspace);

            int level = 0;
            if (gen.SupportsNamespace())
                level = 1;

            if ( internalFile )
                gen.EmitSerialBase( sb, level, supportsGC );

            foreach (Node n in root.childNodes)
            {
                gen.EmitNode(n, sb, level);
            }

            gen.EmitNamespace(sb, true, nspace);
        }