protected virtual void Write(IndentedTextWriter writer, EnumerationDeclaration enumeration)
        {
            writer.Write("enum ");
            WriteIdentifier(writer, enumeration.Name);

            if (enumeration.BaseType != null)
            {
                writer.Write(" : ");
                Write(writer, enumeration.BaseType);
            }

            writer.WriteLine();
            writer.WriteLine("{");
            writer.Indent++;

            Write(writer, enumeration.Members, (e) =>
            {
                if (!e.Last)
                {
                    writer.WriteLine(",");
                }
            });

            writer.WriteLine();
            writer.Indent--;
            writer.WriteLine("}");
        }
Exemple #2
0
 public virtual void VisitEnumerationDeclaration(EnumerationDeclaration enumerationDeclaration)
 {
     VisitTypeDeclaration(enumerationDeclaration);
     Visit(enumerationDeclaration.BaseType);
     VisitCollection(enumerationDeclaration.Members);
 }
 public virtual void VisitEnumerationDeclaration(EnumerationDeclaration enumerationDeclaration)
 {
     VisitTypeDeclaration(enumerationDeclaration);
     VisitTypeReferenceIfNotNull(enumerationDeclaration.BaseType);
     VisitCollection(enumerationDeclaration.Members);
 }