SyntaxFactory.AreEquivalent Method

Definition

Overloads

AreEquivalent(SyntaxTree, SyntaxTree, Boolean)

Determines if two trees are the same, disregarding trivia differences.

AreEquivalent(SyntaxNode, SyntaxNode, Func<SyntaxKind,Boolean>)

Determines if two syntax nodes are the same, disregarding trivia differences.

AreEquivalent(SyntaxNode, SyntaxNode, Boolean)

Determines if two syntax nodes are the same, disregarding trivia differences.

AreEquivalent(SyntaxTokenList, SyntaxTokenList)

Determines if two lists of tokens are the same, disregarding trivia differences.

AreEquivalent(SyntaxToken, SyntaxToken)

Determines if two syntax tokens are the same, disregarding trivia differences.

AreEquivalent<TNode>(SeparatedSyntaxList<TNode>, SeparatedSyntaxList<TNode>, Boolean)

Determines if two lists of syntax nodes are the same, disregarding trivia differences.

AreEquivalent<TNode>(SeparatedSyntaxList<TNode>, SeparatedSyntaxList<TNode>, Func<SyntaxKind,Boolean>)

Determines if two lists of syntax nodes are the same, disregarding trivia differences.

AreEquivalent<TNode>(SyntaxList<TNode>, SyntaxList<TNode>, Boolean)

Determines if two lists of syntax nodes are the same, disregarding trivia differences.

AreEquivalent<TNode>(SyntaxList<TNode>, SyntaxList<TNode>, Func<SyntaxKind,Boolean>)

Determines if two lists of syntax nodes are the same, disregarding trivia differences.

AreEquivalent(SyntaxTree, SyntaxTree, Boolean)

Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs

Determines if two trees are the same, disregarding trivia differences.

public:
 static bool AreEquivalent(Microsoft::CodeAnalysis::SyntaxTree ^ oldTree, Microsoft::CodeAnalysis::SyntaxTree ^ newTree, bool topLevel);
public static bool AreEquivalent (Microsoft.CodeAnalysis.SyntaxTree oldTree, Microsoft.CodeAnalysis.SyntaxTree newTree, bool topLevel);
public static bool AreEquivalent (Microsoft.CodeAnalysis.SyntaxTree? oldTree, Microsoft.CodeAnalysis.SyntaxTree? newTree, bool topLevel);
static member AreEquivalent : Microsoft.CodeAnalysis.SyntaxTree * Microsoft.CodeAnalysis.SyntaxTree * bool -> bool
Public Shared Function AreEquivalent (oldTree As SyntaxTree, newTree As SyntaxTree, topLevel As Boolean) As Boolean

Parameters

oldTree
SyntaxTree

The original tree.

newTree
SyntaxTree

The new tree.

topLevel
Boolean

If true then the trees are equivalent if the contained nodes and tokens declaring metadata visible symbolic information are equivalent, ignoring any differences of nodes inside method bodies or initializer expressions, otherwise all nodes and tokens must be equivalent.

Returns

Applies to

AreEquivalent(SyntaxNode, SyntaxNode, Func<SyntaxKind,Boolean>)

Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs

Determines if two syntax nodes are the same, disregarding trivia differences.

public static bool AreEquivalent (Microsoft.CodeAnalysis.SyntaxNode oldNode, Microsoft.CodeAnalysis.SyntaxNode newNode, Func<Microsoft.CodeAnalysis.CSharp.SyntaxKind,bool> ignoreChildNode = default);
public static bool AreEquivalent (Microsoft.CodeAnalysis.SyntaxNode? oldNode, Microsoft.CodeAnalysis.SyntaxNode? newNode, Func<Microsoft.CodeAnalysis.CSharp.SyntaxKind,bool>? ignoreChildNode = default);
static member AreEquivalent : Microsoft.CodeAnalysis.SyntaxNode * Microsoft.CodeAnalysis.SyntaxNode * Func<Microsoft.CodeAnalysis.CSharp.SyntaxKind, bool> -> bool
Public Shared Function AreEquivalent (oldNode As SyntaxNode, newNode As SyntaxNode, Optional ignoreChildNode As Func(Of SyntaxKind, Boolean) = Nothing) As Boolean

Parameters

oldNode
SyntaxNode

The old node.

newNode
SyntaxNode

The new node.

ignoreChildNode
Func<SyntaxKind,Boolean>

If specified called for every child syntax node (not token) that is visited during the comparison. If it returns true the child is recursively visited, otherwise the child and its subtree is disregarded.

Returns

Applies to

AreEquivalent(SyntaxNode, SyntaxNode, Boolean)

Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs

Determines if two syntax nodes are the same, disregarding trivia differences.

public:
 static bool AreEquivalent(Microsoft::CodeAnalysis::SyntaxNode ^ oldNode, Microsoft::CodeAnalysis::SyntaxNode ^ newNode, bool topLevel);
public static bool AreEquivalent (Microsoft.CodeAnalysis.SyntaxNode oldNode, Microsoft.CodeAnalysis.SyntaxNode newNode, bool topLevel);
public static bool AreEquivalent (Microsoft.CodeAnalysis.SyntaxNode? oldNode, Microsoft.CodeAnalysis.SyntaxNode? newNode, bool topLevel);
static member AreEquivalent : Microsoft.CodeAnalysis.SyntaxNode * Microsoft.CodeAnalysis.SyntaxNode * bool -> bool
Public Shared Function AreEquivalent (oldNode As SyntaxNode, newNode As SyntaxNode, topLevel As Boolean) As Boolean

Parameters

oldNode
SyntaxNode

The old node.

newNode
SyntaxNode

The new node.

topLevel
Boolean

If true then the nodes are equivalent if the contained nodes and tokens declaring metadata visible symbolic information are equivalent, ignoring any differences of nodes inside method bodies or initializer expressions, otherwise all nodes and tokens must be equivalent.

Returns

Applies to

AreEquivalent(SyntaxTokenList, SyntaxTokenList)

Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs

Determines if two lists of tokens are the same, disregarding trivia differences.

public:
 static bool AreEquivalent(Microsoft::CodeAnalysis::SyntaxTokenList oldList, Microsoft::CodeAnalysis::SyntaxTokenList newList);
public static bool AreEquivalent (Microsoft.CodeAnalysis.SyntaxTokenList oldList, Microsoft.CodeAnalysis.SyntaxTokenList newList);
static member AreEquivalent : Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.SyntaxTokenList -> bool
Public Shared Function AreEquivalent (oldList As SyntaxTokenList, newList As SyntaxTokenList) As Boolean

Parameters

oldList
SyntaxTokenList

The old token list.

newList
SyntaxTokenList

The new token list.

Returns

Applies to

AreEquivalent(SyntaxToken, SyntaxToken)

Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs

Determines if two syntax tokens are the same, disregarding trivia differences.

public:
 static bool AreEquivalent(Microsoft::CodeAnalysis::SyntaxToken oldToken, Microsoft::CodeAnalysis::SyntaxToken newToken);
public static bool AreEquivalent (Microsoft.CodeAnalysis.SyntaxToken oldToken, Microsoft.CodeAnalysis.SyntaxToken newToken);
static member AreEquivalent : Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken -> bool
Public Shared Function AreEquivalent (oldToken As SyntaxToken, newToken As SyntaxToken) As Boolean

Parameters

oldToken
SyntaxToken

The old token.

newToken
SyntaxToken

The new token.

Returns

Applies to

AreEquivalent<TNode>(SeparatedSyntaxList<TNode>, SeparatedSyntaxList<TNode>, Boolean)

Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs

Determines if two lists of syntax nodes are the same, disregarding trivia differences.

public:
generic <typename TNode>
 where TNode : Microsoft::CodeAnalysis::SyntaxNode static bool AreEquivalent(Microsoft::CodeAnalysis::SeparatedSyntaxList<TNode> oldList, Microsoft::CodeAnalysis::SeparatedSyntaxList<TNode> newList, bool topLevel);
public static bool AreEquivalent<TNode> (Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode> oldList, Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode> newList, bool topLevel) where TNode : Microsoft.CodeAnalysis.SyntaxNode;
static member AreEquivalent : Microsoft.CodeAnalysis.SeparatedSyntaxList<'Node (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)> * Microsoft.CodeAnalysis.SeparatedSyntaxList<'Node (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)> * bool -> bool (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)
Public Shared Function AreEquivalent(Of TNode As SyntaxNode) (oldList As SeparatedSyntaxList(Of TNode), newList As SeparatedSyntaxList(Of TNode), topLevel As Boolean) As Boolean

Type Parameters

TNode

Parameters

oldList
SeparatedSyntaxList<TNode>

The old list.

newList
SeparatedSyntaxList<TNode>

The new list.

topLevel
Boolean

If true then the nodes are equivalent if the contained nodes and tokens declaring metadata visible symbolic information are equivalent, ignoring any differences of nodes inside method bodies or initializer expressions, otherwise all nodes and tokens must be equivalent.

Returns

Applies to

AreEquivalent<TNode>(SeparatedSyntaxList<TNode>, SeparatedSyntaxList<TNode>, Func<SyntaxKind,Boolean>)

Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs

Determines if two lists of syntax nodes are the same, disregarding trivia differences.

public static bool AreEquivalent<TNode> (Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode> oldList, Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode> newList, Func<Microsoft.CodeAnalysis.CSharp.SyntaxKind,bool> ignoreChildNode = default) where TNode : Microsoft.CodeAnalysis.SyntaxNode;
public static bool AreEquivalent<TNode> (Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode> oldList, Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode> newList, Func<Microsoft.CodeAnalysis.CSharp.SyntaxKind,bool>? ignoreChildNode = default) where TNode : Microsoft.CodeAnalysis.SyntaxNode;
static member AreEquivalent : Microsoft.CodeAnalysis.SeparatedSyntaxList<'Node (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)> * Microsoft.CodeAnalysis.SeparatedSyntaxList<'Node (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)> * Func<Microsoft.CodeAnalysis.CSharp.SyntaxKind, bool> -> bool (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)
Public Shared Function AreEquivalent(Of TNode As SyntaxNode) (oldList As SeparatedSyntaxList(Of TNode), newList As SeparatedSyntaxList(Of TNode), Optional ignoreChildNode As Func(Of SyntaxKind, Boolean) = Nothing) As Boolean

Type Parameters

TNode

Parameters

oldList
SeparatedSyntaxList<TNode>

The old list.

newList
SeparatedSyntaxList<TNode>

The new list.

ignoreChildNode
Func<SyntaxKind,Boolean>

If specified called for every child syntax node (not token) that is visited during the comparison. If it returns true the child is recursively visited, otherwise the child and its subtree is disregarded.

Returns

Applies to

AreEquivalent<TNode>(SyntaxList<TNode>, SyntaxList<TNode>, Boolean)

Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs

Determines if two lists of syntax nodes are the same, disregarding trivia differences.

public:
generic <typename TNode>
 where TNode : Microsoft::CodeAnalysis::CSharp::CSharpSyntaxNode static bool AreEquivalent(Microsoft::CodeAnalysis::SyntaxList<TNode> oldList, Microsoft::CodeAnalysis::SyntaxList<TNode> newList, bool topLevel);
public static bool AreEquivalent<TNode> (Microsoft.CodeAnalysis.SyntaxList<TNode> oldList, Microsoft.CodeAnalysis.SyntaxList<TNode> newList, bool topLevel) where TNode : Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode;
static member AreEquivalent : Microsoft.CodeAnalysis.SyntaxList<'Node (requires 'Node :> Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode)> * Microsoft.CodeAnalysis.SyntaxList<'Node (requires 'Node :> Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode)> * bool -> bool (requires 'Node :> Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode)
Public Shared Function AreEquivalent(Of TNode As CSharpSyntaxNode) (oldList As SyntaxList(Of TNode), newList As SyntaxList(Of TNode), topLevel As Boolean) As Boolean

Type Parameters

TNode

Parameters

oldList
SyntaxList<TNode>

The old list.

newList
SyntaxList<TNode>

The new list.

topLevel
Boolean

If true then the nodes are equivalent if the contained nodes and tokens declaring metadata visible symbolic information are equivalent, ignoring any differences of nodes inside method bodies or initializer expressions, otherwise all nodes and tokens must be equivalent.

Returns

Applies to

AreEquivalent<TNode>(SyntaxList<TNode>, SyntaxList<TNode>, Func<SyntaxKind,Boolean>)

Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs
Source:
SyntaxFactory.cs

Determines if two lists of syntax nodes are the same, disregarding trivia differences.

public static bool AreEquivalent<TNode> (Microsoft.CodeAnalysis.SyntaxList<TNode> oldList, Microsoft.CodeAnalysis.SyntaxList<TNode> newList, Func<Microsoft.CodeAnalysis.CSharp.SyntaxKind,bool> ignoreChildNode = default) where TNode : Microsoft.CodeAnalysis.SyntaxNode;
public static bool AreEquivalent<TNode> (Microsoft.CodeAnalysis.SyntaxList<TNode> oldList, Microsoft.CodeAnalysis.SyntaxList<TNode> newList, Func<Microsoft.CodeAnalysis.CSharp.SyntaxKind,bool>? ignoreChildNode = default) where TNode : Microsoft.CodeAnalysis.SyntaxNode;
static member AreEquivalent : Microsoft.CodeAnalysis.SyntaxList<'Node (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)> * Microsoft.CodeAnalysis.SyntaxList<'Node (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)> * Func<Microsoft.CodeAnalysis.CSharp.SyntaxKind, bool> -> bool (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)
Public Shared Function AreEquivalent(Of TNode As SyntaxNode) (oldList As SyntaxList(Of TNode), newList As SyntaxList(Of TNode), Optional ignoreChildNode As Func(Of SyntaxKind, Boolean) = Nothing) As Boolean

Type Parameters

TNode

Parameters

oldList
SyntaxList<TNode>

The old list.

newList
SyntaxList<TNode>

The new list.

ignoreChildNode
Func<SyntaxKind,Boolean>

If specified called for every child syntax node (not token) that is visited during the comparison. If it returns true the child is recursively visited, otherwise the child and its subtree is disregarded.

Returns

Applies to