示例#1
0
 private int GetHashCode(HtmlComment comment) => new HashCodeBuilder()
 .Add(comment.Value, StringComparer.Ordinal)
 .Build();
示例#2
0
 /// <summary>
 /// Initializes an instance of <see cref="HtmlComment"/>.
 /// </summary>
 public HtmlComment(HtmlComment other)
     : this(other.Value)
 {
 }
示例#3
0
 private bool Equals(HtmlComment x, HtmlComment y) =>
 StringComparer.Ordinal.Equals(x.Value, y.Value);
示例#4
0
        /// <summary>
        /// Converts this <see cref="HtmlComment"/> to an instance of <see cref="XComment"/>.
        /// </summary>
        public static XComment ToXComment(this HtmlComment comment)
        {
            comment.GuardNotNull(nameof(comment));

            return(new XComment(comment.Value));
        }