SyntaxNodeExtensions.InsertTriviaBefore<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 trivia inserted before the specified trivia.
public:
generic <typename TRoot>
where TRoot : Microsoft::CodeAnalysis::SyntaxNode[System::Runtime::CompilerServices::Extension]
static TRoot InsertTriviaBefore(TRoot root, Microsoft::CodeAnalysis::SyntaxTrivia trivia, System::Collections::Generic::IEnumerable<Microsoft::CodeAnalysis::SyntaxTrivia> ^ newTrivia);
public static TRoot InsertTriviaBefore<TRoot> (this TRoot root, Microsoft.CodeAnalysis.SyntaxTrivia trivia, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxTrivia> newTrivia) where TRoot : Microsoft.CodeAnalysis.SyntaxNode;
static member InsertTriviaBefore : 'Root * Microsoft.CodeAnalysis.SyntaxTrivia * seq<Microsoft.CodeAnalysis.SyntaxTrivia> -> 'Root (requires 'Root :> Microsoft.CodeAnalysis.SyntaxNode)
<Extension()>
Public Function InsertTriviaBefore(Of TRoot As SyntaxNode) (root As TRoot, trivia As SyntaxTrivia, newTrivia As IEnumerable(Of SyntaxTrivia)) As TRoot
Type Parameters
- TRoot
The type of the root node.
Parameters
- root
- TRoot
The root of the tree of nodes.
- trivia
- SyntaxTrivia
The trivia to insert before; a descendant of the root node.
- newTrivia
- IEnumerable<SyntaxTrivia>
A sequence of trivia to insert into the tree immediately before the specified trivia.
Returns
TRoot
Applies to
Spolupracujte s námi na GitHubu
Zdroj tohoto obsahu najdete na GitHubu, kde můžete také vytvářet a kontrolovat problémy a žádosti o přijetí změn. Další informace najdete v našem průvodci pro přispěvatele.