/// <summary> /// Initializes a new instance of the <see cref="CompareNode"/> class with the orphan this node encapsulates and the parent to use for this node. /// </summary> /// <param name="orphan">The orphan this node encapsulates.</param> /// <param name="parent">The parent of this node.</param> internal CompareNode(CompareOrphan orphan, CompareNode parent) : base(orphan, parent) { }
/// <summary> /// The action to perform for all orphans whose visitor method is not overridden. /// </summary> /// <param name="orphan">The orphan to visit.</param> /// <returns>The result of visiting the orphan.</returns> protected abstract TResult DefaultVisit(CompareOrphan orphan);
internal override bool IsNameEqual(string name, StringComparison comparison, CompareNode node) => CompareOrphan.IsCompareNameEqual(name, comparison, node.Orphan);
/// <summary> /// Visits a single <see cref="CompareOrphan"/> and produces a value of type <typeparamref name="TResult"/>. /// </summary> /// <param name="orphan">The orphan to visit.</param> /// <returns>The result of visitng the orphan.</returns> protected internal override TResult VisitOrphan(CompareOrphan orphan) => DefaultVisit(orphan);