protected virtual void AsTextContent(CodeWriter writer, RenderFlags flags)
 {
     writer.EscapeUnicode = false;
     if (_content is string)
     {
         DocText.AsTextText(writer, GetContentForDisplay(flags), flags);
     }
     else if (_content is ChildList <DocComment> )
     {
         ChildList <DocComment> content = (ChildList <DocComment>)_content;
         for (int i = 0; i < content.Count; ++i)
         {
             DocComment docComment = content[i];
             if (docComment is DocText)
             {
                 DocText.AsTextText(writer, GetContentForDisplay((DocText)docComment, i == 0, i == content.Count - 1, flags), flags);
             }
             else
             {
                 docComment.AsText(writer, flags);
             }
         }
     }
     else if (_content is CodeObject)
     {
         // Turn on translation of '<', '&', and '>' for content
         writer.InDocCommentContent = true;
         ((CodeObject)_content).AsText(writer, flags);
         writer.InDocCommentContent = false;
     }
     writer.EscapeUnicode = true;
 }
 protected override void AsTextStart(CodeWriter writer, RenderFlags flags)
 {
     if (!flags.HasFlag(RenderFlags.Description))
     {
         writer.Write("<" + TagName + " " + AttributeName + "=\"");
     }
     if (_codeRef != null)
     {
         // Turn on translation of '<', '&', and '>' for content
         writer.InDocCommentContent = true;
         if (_codeRef is Expression)
         {
             ((Expression)_codeRef).AsText(writer, flags);
         }
         else if (_codeRef is string)
         {
             DocText.AsTextText(writer, (string)_codeRef, flags);
         }
         writer.InDocCommentContent = false;
     }
     if (!flags.HasFlag(RenderFlags.Description))
     {
         writer.Write("\"" + (_content == null && !MissingEndTag ? "/>" : ">"));
     }
 }
Example #3
0
 protected override void AsTextContent(CodeWriter writer, RenderFlags flags)
 {
     DocText.AsTextText(writer, GetContentForDisplay(flags), flags | RenderFlags.NoTranslations);
 }