Click or drag to resize

TreeComparerTNode Class



Implements a tree differencing algorithm.
Inheritance Hierarchy
SystemObject
  Microsoft.CodeAnalysis.DifferencingTreeComparerTNode

Namespace:  Microsoft.CodeAnalysis.Differencing
Assembly:  Microsoft.CodeAnalysis.Workspaces (in Microsoft.CodeAnalysis.Workspaces.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public abstract class TreeComparer<TNode>

Type Parameters

TNode
Tree node.

The TreeComparerTNode type exposes the following members.

Constructors
  NameDescription
Protected methodTreeComparerTNode
Initializes a new instance of the TreeComparerTNode class
Top
Properties
  NameDescription
Protected propertyLabelCount
The number of distinct labels used in the tree.
Top
Methods
  NameDescription
Public methodComputeEditScript
Returns an edit script that transforms oldRoot to newRoot.
Public methodComputeMatch
Protected methodGetChildren
Protected methodGetDescendants
Public methodGetDistance
Calculates the distance [0..1] of two nodes.
Protected methodGetLabel
Returns an integer label corresponding to the given node.
Protected methodGetSpan
Returns the position of the node.
Protected methodTiedToAncestor
Returns N > 0 if the node with specified label can't change its N-th ancestor node, zero otherwise.
Protected methodTreesEqual
Return true if specified nodes belong to the same tree.
Protected methodTryGetParent
Returns a parent for the specified node.
Public methodValuesEqual
Returns true if the specified nodes have equal values.
Top
Remarks
Subclasses define relationships among tree nodes, and parameters to the differencing algorithm.
See Also