'Declaration Public Function GetEquivalentNode( _ ByVal node As SyntaxNode _ ) As SyntaxNode
public SyntaxNode GetEquivalentNode( SyntaxNode node )
Exception | Description |
---|---|
System.ArgumentNullException | Occurs when node is null. |
Callers of the AddAnnotation or AddDiagnostic methods will get returned a reference to an equivalent tree. This tree represents the same textual content as the original with extra data decorating a node in the equivalent tree. GetEquivalentNode will take a node from one tree and return the node representing the same textual content on an equivalent tree.
If the node specified is from a tree which is not equivalent, GetEquivalentNode will return null.
Trees can be tested for equivalence by seeing if their Snapshot values are the same.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2