Skip to main content

SyntaxExtensions.PrependToTrailingTrivia Method

Containing Type: SyntaxExtensions

Assembly: Roslynator.Core.dll

Overloads​

MethodSummary
PrependToTrailingTrivia(SyntaxToken, IEnumerable<SyntaxTrivia>)Creates a new token from this token with the trailing trivia replaced with a new trivia where the specified trivia is inserted at the beginning of the trailing trivia.
PrependToTrailingTrivia(SyntaxToken, SyntaxTrivia)Creates a new token from this token with the trailing trivia replaced with a new trivia where the specified trivia is inserted at the beginning of the trailing trivia.
PrependToTrailingTrivia<TNode>(TNode, IEnumerable<SyntaxTrivia>)Creates a new node from this node with the trailing trivia replaced with a new trivia where the specified trivia is inserted at the beginning of the trailing trivia.
PrependToTrailingTrivia<TNode>(TNode, SyntaxTrivia)Creates a new node from this node with the trailing trivia replaced with a new trivia where the specified trivia is inserted at the beginning of the trailing trivia.

PrependToTrailingTrivia(SyntaxToken, IEnumerable<SyntaxTrivia>)​

Creates a new token from this token with the trailing trivia replaced with a new trivia where the specified trivia is inserted at the beginning of the trailing trivia.

public static Microsoft.CodeAnalysis.SyntaxToken PrependToTrailingTrivia(this Microsoft.CodeAnalysis.SyntaxToken token, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxTrivia> trivia)

Parameters​

token   SyntaxToken

trivia   IEnumerable<SyntaxTrivia>

Returns​

SyntaxToken

PrependToTrailingTrivia(SyntaxToken, SyntaxTrivia)​

Creates a new token from this token with the trailing trivia replaced with a new trivia where the specified trivia is inserted at the beginning of the trailing trivia.

public static Microsoft.CodeAnalysis.SyntaxToken PrependToTrailingTrivia(this Microsoft.CodeAnalysis.SyntaxToken token, Microsoft.CodeAnalysis.SyntaxTrivia trivia)

Parameters​

token   SyntaxToken

trivia   SyntaxTrivia

Returns​

SyntaxToken

PrependToTrailingTrivia<TNode>(TNode, IEnumerable<SyntaxTrivia>)​

Creates a new node from this node with the trailing trivia replaced with a new trivia where the specified trivia is inserted at the beginning of the trailing trivia.

public static TNode PrependToTrailingTrivia<TNode>(this TNode node, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxTrivia> trivia) where TNode : Microsoft.CodeAnalysis.SyntaxNode

Type Parameters​

TNode

Parameters​

node   TNode

trivia   IEnumerable<SyntaxTrivia>

Returns​

TNode

PrependToTrailingTrivia<TNode>(TNode, SyntaxTrivia)​

Creates a new node from this node with the trailing trivia replaced with a new trivia where the specified trivia is inserted at the beginning of the trailing trivia.

public static TNode PrependToTrailingTrivia<TNode>(this TNode node, Microsoft.CodeAnalysis.SyntaxTrivia trivia) where TNode : Microsoft.CodeAnalysis.SyntaxNode

Type Parameters​

TNode

Parameters​

node   TNode

trivia   SyntaxTrivia

Returns​

TNode