private int GetHashCode(HtmlComment comment) => new HashCodeBuilder() .Add(comment.Value, StringComparer.Ordinal) .Build();
/// <summary> /// Initializes an instance of <see cref="HtmlComment"/>. /// </summary> public HtmlComment(HtmlComment other) : this(other.Value) { }
private bool Equals(HtmlComment x, HtmlComment y) => StringComparer.Ordinal.Equals(x.Value, y.Value);
/// <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)); }