SyntaxNodeExtensions.InsertNodesBefore<TRoot> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new tree of nodes with new nodes inserted before the specified node.
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
Type Parameters
- TRoot
The type of the root node.
Parameters
- root
- TRoot
The root of the tree of nodes.
- nodeInList
- SyntaxNode
The node to insert before; a descendant of the root node an element of a list member.
- newNodes
- IEnumerable<SyntaxNode>
A sequence of nodes to insert into the tree immediately before the specified node.
Returns
TRoot