Exemplo n.º 1
0
        internal override void WriteImpl(ref HtmlEncodingTextWriter writer)
        {
            writer.WriteRaw('<');

            if (_shouldEncodeName)
            {
                writer.Write(_name);
            }
            else
            {
                writer.WriteRaw(_name);
            }

            foreach (var attr in _attributes)
            {
                writer.WriteRaw(' ');
                attr.Write(ref writer);
            }

            writer.WriteRaw("/>");
        }
Exemplo n.º 2
0
        internal override void WriteImpl(ref HtmlEncodingTextWriter writer)
        {
            writer.WriteRaw('<');

            if (_shouldEncodeName)
            {
                writer.Write(_tagName);
            }
            else
            {
                writer.WriteRaw(_tagName);
            }

            foreach (var attr in _attributes)
            {
                writer.WriteRaw(' ');
                attr.Write(ref writer);
            }

            writer.WriteRaw('>');

            foreach (var child in _children)
            {
                child.WriteImpl(ref writer);
            }

            writer.WriteRaw("</");
            writer.Write(_tagName);
            writer.WriteRaw('>');
        }
Exemplo n.º 3
0
 internal void Write(ref HtmlEncodingTextWriter writer)
 {
     if (_shouldEncode)
     {
         writer.Write(_name);
         if (_value != null)
         {
             writer.WriteRaw("=\"");
             writer.Write(_value);
             writer.WriteRaw('"');
         }
     }
     else
     {
         writer.WriteRaw(_name);
         if (_value != null)
         {
             writer.WriteRaw("=\"");
             writer.WriteRaw(_value);
             writer.WriteRaw('"');
         }
     }
 }
Exemplo n.º 4
0
 internal override void WriteImpl(ref HtmlEncodingTextWriter writer)
 {
     writer.WriteRaw(_rawHtml);
 }