Esempio n. 1
0
 /// <inheritdoc />
 public override bool StructurallyEquals(BBNode node)
 {
     return(node is BBTagNode tagNode &&
            SelfClosing == tagNode.SelfClosing &&
            Name == tagNode.Name &&
            Value == tagNode.Value &&
            Children.Zip(tagNode.Children, (a, b) => a.StructurallyEquals(b)).All(x => x));
 }
Esempio n. 2
0
 /// <inheritdoc />
 public void AddChild(BBNode child)
 {
     if (SelfClosing)
     {
         throw new InvalidOperationException("A self-closing tag cannot have children.");
     }
     else
     {
         _children.Add(child);
     }
 }
Esempio n. 3
0
 /// <inheritdoc />
 public override bool StructurallyEquals(BBNode node)
 {
     return(node is BBTextNode textNode &&
            Content == textNode.Content);
 }