Condividi tramite


SyntaxNodeExtensions.InsertNodesBefore<TRoot> Metodo

Definizione

Crea un nuovo albero di nodi con nuovi nodi inseriti prima del nodo specificato.

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

Parametri di tipo

TRoot

Tipo del nodo radice.

Parametri

root
TRoot

Radice dell'albero dei nodi.

nodeInList
SyntaxNode

Nodo da inserire prima; discendente del nodo radice un elemento di un membro dell'elenco.

newNodes
IEnumerable<SyntaxNode>

Sequenza di nodi da inserire nell'albero immediatamente prima del nodo specificato.

Restituisce

TRoot

Si applica a