Compartilhar via


SyntaxNodeExtensions.InsertNodesBefore<TRoot> Método

Definição

Cria uma nova árvore de nós com novos nós inseridos antes do nó especificado.

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

Parâmetros de tipo

TRoot

O tipo do nó raiz.

Parâmetros

root
TRoot

A raiz da árvore de nós.

nodeInList
SyntaxNode

O nó a ser inserido antes; um descendente do nó raiz um elemento de um membro de lista.

newNodes
IEnumerable<SyntaxNode>

Uma sequência de nós a serem inseridos na árvore imediatamente antes do nó especificado.

Retornos

TRoot

Aplica-se a