Esempio n. 1
0
        public void VisitArrayIndexer(CodeArrayIndexerExpression aref)
        {
            Write(aref.TargetObject, Precedence.Primary, false);
            writer.Write("[");
            var sep = "";

            foreach (var sub in aref.Indices)
            {
                writer.Write(sep);
                sep = ",";
                Write(sub, Precedence.Base, false);
            }
            writer.Write("]");
        }
Esempio n. 2
0
        public int VisitField(CodeMemberField field)
        {
            RenderMemberFieldAttributes(field.Attributes);
            var expWriter = new CSharpExpressionWriter(writer);

            expWriter.VisitTypeReference(field.FieldType);
            writer.Write(" ");
            writer.WriteName(field.FieldName);
            if (field.InitExpression != null)
            {
                writer.Write(" = ");
                field.InitExpression.Accept(expWriter);
            }
            writer.Write(";");
            writer.WriteLine();
            return(0);
        }
Esempio n. 3
0
 private void EndLineWithSemi()
 {
     if (!suppressSemi)
     {
         writer.Write(";");
         TerminateLine();
     }
 }