Beispiel #1
0
 private int GetHashCode(HtmlDeclaration declaration) => new HashCodeBuilder()
 .Add(declaration.Name, StringComparer.OrdinalIgnoreCase)
 .Add(declaration.Value, StringComparer.OrdinalIgnoreCase)
 .Build();
Beispiel #2
0
 private bool Equals(HtmlDeclaration x, HtmlDeclaration y) =>
 StringComparer.OrdinalIgnoreCase.Equals(x.Name, y.Name) &&
 StringComparer.OrdinalIgnoreCase.Equals(x.Value, y.Value);
Beispiel #3
0
 /// <summary>
 /// Initializes an instance of <see cref="HtmlDocument"/>.
 /// </summary>
 public HtmlDocument(HtmlDeclaration declaration, IReadOnlyList <HtmlNode> children)
     : base(children)
 {
     Declaration = declaration.GuardNotNull(nameof(declaration));
 }
Beispiel #4
0
 /// <summary>
 /// Initializes an instance of <see cref="HtmlDocument"/>.
 /// </summary>
 public HtmlDocument(HtmlDeclaration declaration, params HtmlNode[] children)
     : this(declaration, (IReadOnlyList <HtmlNode>)children)
 {
 }
Beispiel #5
0
 /// <summary>
 /// Initializes an instance of <see cref="HtmlDeclaration"/>.
 /// </summary>
 public HtmlDeclaration(HtmlDeclaration other)
     : this(other.Name, other.Value)
 {
 }