/// <summary> /// Initializes an instance of <see cref="HtmlAttribute"/>. /// </summary> public HtmlAttribute(HtmlAttribute other) : this(other.Name, other.Value) { }
/// <summary> /// Initializes an instance of <see cref="HtmlElement"/>. /// </summary> public HtmlElement(string name, HtmlAttribute attribute, params HtmlNode[] children) : this(name, new[] { attribute }, children) { }
/// <summary> /// Initializes an instance of <see cref="HtmlElement"/>. /// </summary> public HtmlElement(string name, HtmlAttribute attribute1, HtmlAttribute attribute2, HtmlAttribute attribute3, HtmlAttribute attribute4, params HtmlNode[] children) : this(name, new[] { attribute1, attribute2, attribute3, attribute4 }, children) { }
/// <summary> /// Converts this <see cref="HtmlAttribute"/> to an instance of <see cref="XAttribute"/>. /// </summary> public static XAttribute ToXAttribute(this HtmlAttribute attribute) { attribute.GuardNotNull(nameof(attribute)); return(new XAttribute(attribute.Name, attribute.Value ?? "")); }