protected virtual bool OnRight(T caller, T b) { NodeFinder <T> a = new NodeFinder <T>(_visitor); T found = a.Find(caller, b, _a); if (found == null) { _handler(caller, new NodeDiff <T>(found, b)); //Insertion _same = false; } //Note: We ignore edits in this case. return(true); }
//Events protected virtual bool OnLeft(T caller, T a) { NodeFinder <T> b = new NodeFinder <T>(_visitor); T found = b.Find(caller, a, _b); if (found == null) { _handler(caller, new NodeDiff <T>(a, found)); //Delete _same = false; return(false); //Stop processing deletions } else if (found.CompareTo(a) != 0) { _handler(caller, new NodeDiff <T>(a, found)); //Edit _same = false; } return(true); }