共用方式為


SyntaxNodeExtensions.ReplaceNode 方法

定義

多載

ReplaceNode<TRoot>(TRoot, SyntaxNode, SyntaxNode)

使用以新節點取代的指定舊節點,建立節點的新樹狀結構。

ReplaceNode<TRoot>(TRoot, SyntaxNode, IEnumerable<SyntaxNode>)

使用以新節點取代的指定舊節點,建立節點的新樹狀結構。

ReplaceNode<TRoot>(TRoot, SyntaxNode, SyntaxNode)

Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs

使用以新節點取代的指定舊節點,建立節點的新樹狀結構。

public:
generic <typename TRoot>
 where TRoot : Microsoft::CodeAnalysis::SyntaxNode[System::Runtime::CompilerServices::Extension]
 static TRoot ReplaceNode(TRoot root, Microsoft::CodeAnalysis::SyntaxNode ^ oldNode, Microsoft::CodeAnalysis::SyntaxNode ^ newNode);
public static TRoot ReplaceNode<TRoot> (this TRoot root, Microsoft.CodeAnalysis.SyntaxNode oldNode, Microsoft.CodeAnalysis.SyntaxNode newNode) where TRoot : Microsoft.CodeAnalysis.SyntaxNode;
static member ReplaceNode : 'Root * Microsoft.CodeAnalysis.SyntaxNode * Microsoft.CodeAnalysis.SyntaxNode -> 'Root (requires 'Root :> Microsoft.CodeAnalysis.SyntaxNode)
<Extension()>
Public Function ReplaceNode(Of TRoot As SyntaxNode) (root As TRoot, oldNode As SyntaxNode, newNode As SyntaxNode) As TRoot

類型參數

TRoot

根節點的類型。

參數

root
TRoot

節點樹狀結構的根節點。

oldNode
SyntaxNode

要取代的節點;根節點的子代。

newNode
SyntaxNode

要用於新樹狀結構中的新節點取代舊節點。

傳回

TRoot

適用於

ReplaceNode<TRoot>(TRoot, SyntaxNode, IEnumerable<SyntaxNode>)

Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs

使用以新節點取代的指定舊節點,建立節點的新樹狀結構。

public:
generic <typename TRoot>
 where TRoot : Microsoft::CodeAnalysis::SyntaxNode[System::Runtime::CompilerServices::Extension]
 static TRoot ReplaceNode(TRoot root, Microsoft::CodeAnalysis::SyntaxNode ^ oldNode, System::Collections::Generic::IEnumerable<Microsoft::CodeAnalysis::SyntaxNode ^> ^ newNodes);
public static TRoot ReplaceNode<TRoot> (this TRoot root, Microsoft.CodeAnalysis.SyntaxNode oldNode, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode> newNodes) where TRoot : Microsoft.CodeAnalysis.SyntaxNode;
static member ReplaceNode : 'Root * Microsoft.CodeAnalysis.SyntaxNode * seq<Microsoft.CodeAnalysis.SyntaxNode> -> 'Root (requires 'Root :> Microsoft.CodeAnalysis.SyntaxNode)
<Extension()>
Public Function ReplaceNode(Of TRoot As SyntaxNode) (root As TRoot, oldNode As SyntaxNode, newNodes As IEnumerable(Of SyntaxNode)) As TRoot

類型參數

TRoot

根節點的類型。

參數

root
TRoot

節點樹狀結構的根目錄。

oldNode
SyntaxNode

要取代的節點;根節點的子代和清單成員的元素。

newNodes
IEnumerable<SyntaxNode>

要用來取代舊節點之樹狀結構中的節點序列。

傳回

TRoot

適用於