Ejemplo n.º 1
0
        public override void ToSource(StringBuilder sb)
        {
            sb.Append(IdentNewLine(DocComment));

            if (attributes != null)
            {
                attributes.ToSource(sb);
            }

            TraceModifiers(modifiers, sb);

            type.ToSource(sb);
            sb.Append(" ");
            if (interfaceType != null)
            {
                interfaceType.ToSource(sb);
                sb.Append(".");
            }
            sb.Append("this[");
            if (parameters != null)
            {
                parameters.ToSource(sb, ", ");
            }
            sb.Append("]");

            // start block
            NewLine(sb);
            sb.Append("{");
            indent++;
            NewLine(sb);

            if (getter != null)
            {
                getter.ToSource(sb);
            }
            if (setter != null)
            {
                setter.ToSource(sb);
            }

            indent--;
            NewLine(sb);
            sb.Append("}");
            NewLine(sb);
        }
Ejemplo n.º 2
0
        public override void ToSource(StringBuilder sb)
        {
            sb.Append(IdentNewLine(DocComment));

            if (attributes != null)
            {
                attributes.ToSource(sb);
            }

            TraceModifiers(Modifiers, sb);

            type.ToSource(sb);
            sb.Append(" ");

            names[0].ToSource(sb);

            // start block
            NewLine(sb);
            sb.Append("{");
            indent++;
            NewLine(sb);

            if (getter != null)
            {
                getter.ToSource(sb);
            }
            if (setter != null)
            {
                setter.ToSource(sb);
            }

            indent--;
            NewLine(sb);
            sb.Append("}");
            NewLine(sb);
        }