/// <summary> /// Write the attribute to the output stream. /// </summary> /// <remarks> /// Writes the attribute to the output stream. /// </remarks> /// <param name="attribute">The attribute.</param> /// <exception cref="System.ArgumentNullException"> /// <paramref name="attribute"/> is <c>null</c>. /// </exception> /// <exception cref="System.InvalidOperationException"> /// The <see cref="HtmlWriter"/> is not in a state that allows writing attributes. /// </exception> /// <exception cref="System.ObjectDisposedException"> /// The <see cref="HtmlWriter"/> has been disposed. /// </exception> public void WriteAttribute (HtmlAttribute attribute) { if (attribute == null) throw new ArgumentNullException ("attribute"); EncodeAttributeName (attribute.Name); if (attribute.Value != null) EncodeAttributeValue (attribute.Value); }
void EmitTagAttribute() { attribute = CreateAttribute (name.ToString ()); tag.Attributes.Add (attribute); name.Length = 0; }