예제 #1
0
 /// <summary>
 /// Initializes an instance of <see cref="HtmlAttribute"/>.
 /// </summary>
 public HtmlAttribute(HtmlAttribute other)
     : this(other.Name, other.Value)
 {
 }
예제 #2
0
 /// <summary>
 /// Initializes an instance of <see cref="HtmlElement"/>.
 /// </summary>
 public HtmlElement(string name, HtmlAttribute attribute, params HtmlNode[] children)
     : this(name, new[] { attribute }, children)
 {
 }
예제 #3
0
 /// <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)
 {
 }
예제 #4
0
        /// <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 ?? ""));
        }