internal void GenerateCodeFromMember(CodeMember member, TextWriter writer, CodeGeneratorOptions codeGeneratorOptions)
        {
            this.writer = new IndentingTextWriter(writer);
            var memberWriter = new CSharpTypeWriter(null, this.writer);

            member.Accept(memberWriter);
        }
Beispiel #2
0
 private void RenderCustomAttributes(CodeMember member)
 {
     foreach (var attr in member.CustomAttributes)
     {
         writer.Write("[");
         writer.Write(attr.AttributeType.TypeName);
         if (attr.Arguments.Count > 0)
         {
             writer.Write("(");
             var sep = "";
             foreach (var arg in attr.Arguments)
             {
                 writer.Write(sep);
                 sep = ",";
                 WriteAttrArgument(arg);
             }
             writer.Write(")");
         }
         writer.WriteLine("]");
     }
 }
Beispiel #3
0
 private void AddMemberWithComments(CodeMember c)
 {
     c.Comments.AddRange(Scope.OfType <CodeCommentStatement>());
     Scope.RemoveAll(s => s is CodeCommentStatement);
     CurrentType.Members.Add(c);
 }