Exemplo n.º 1
0
 private int GetHashCode(HtmlDeclaration declaration) => new HashCodeBuilder()
 .Add(declaration.Name, StringComparer.OrdinalIgnoreCase)
 .Add(declaration.Value, StringComparer.OrdinalIgnoreCase)
 .Build();
Exemplo n.º 2
0
 private bool Equals(HtmlDeclaration x, HtmlDeclaration y) =>
 StringComparer.OrdinalIgnoreCase.Equals(x.Name, y.Name) &&
 StringComparer.OrdinalIgnoreCase.Equals(x.Value, y.Value);
Exemplo n.º 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));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes an instance of <see cref="HtmlDocument"/>.
 /// </summary>
 public HtmlDocument(HtmlDeclaration declaration, params HtmlNode[] children)
     : this(declaration, (IReadOnlyList <HtmlNode>)children)
 {
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes an instance of <see cref="HtmlDeclaration"/>.
 /// </summary>
 public HtmlDeclaration(HtmlDeclaration other)
     : this(other.Name, other.Value)
 {
 }