Пример #1
0
 private void VisitMemberDeclaration(MemberDeclaration memberDeclaration)
 {
     VisitCustomAttributeContainer(memberDeclaration);
     VisitCommentable(memberDeclaration);
     VisitXmlCommentable(memberDeclaration);
     VisitCollection(memberDeclaration.Implements);
 }
        protected virtual void Write(IndentedTextWriter writer, MemberDeclaration member)
        {
            WriteXmlComments(writer, member);
            WriteBeforeComments(writer, member);
            switch (member)
            {
            case EnumerationMember o:
                Write(writer, o);
                break;

            case MethodDeclaration o:
                Write(writer, o);
                break;

            case OperatorDeclaration o:
                Write(writer, o);
                break;

            case FieldDeclaration o:
                Write(writer, o);
                break;

            case ConstructorDeclaration o:
                Write(writer, o);
                break;

            case PropertyDeclaration o:
                Write(writer, o);
                break;

            case EventFieldDeclaration o:
                Write(writer, o);
                break;

            default:
                throw new NotSupportedException();
            }

            WriteAfterComments(writer, member);
        }