21 references to Comparer
Microsoft.CodeAnalysis.Workspaces (21)
Differencing\EditScript.cs (21)
44var rootChildren = Comparer.GetChildren(Root2);
60var grandChildren = Comparer.GetChildren(child);
72Debug.Assert(Comparer.TreesEqual(x, Root2));
87var hasParent = Comparer.TryGetParent(x, out var y);
95edits.Add(new Edit<TNode>(EditKind.Insert, Comparer, oldNode: default, newNode: x));
104var v = Comparer.GetParent(w);
112if (!Comparer.ValuesEqual(w, x))
114edits.Add(new Edit<TNode>(EditKind.Update, Comparer, oldNode: w, newNode: x));
126edits.Add(new Edit<TNode>(EditKind.Move, Comparer, oldNode: w, newNode: x));
152foreach (var w in Comparer.GetDescendants(Root1))
156edits.Add(new Edit<TNode>(EditKind.Delete, Comparer, oldNode: w, newNode: default));
163Debug.Assert(Comparer.TreesEqual(w, Root1));
164Debug.Assert(Comparer.TreesEqual(x, Root2));
167if ((wChildren = Comparer.GetChildren(w)) == null || (xChildren = Comparer.GetChildren(x)) == null)
183if (Match.TryGetPartnerInTree2(e, out var pw) && Comparer.GetParent(pw).Equals(x))
194if (Match.TryGetPartnerInTree1(e, out var px) && Comparer.GetParent(px).Equals(w))
230Comparer.GetParent(b).Equals(x) &&
233Debug.Assert(Comparer.TreesEqual(a, Root1));
234Debug.Assert(Comparer.TreesEqual(b, Root2));
236edits.Add(new Edit<TNode>(EditKind.Reorder, Comparer, oldNode: a, newNode: b));