Skip to main content

SyntaxExtensions.AppendToLeadingTrivia Method

Containing Type: SyntaxExtensions

Assembly: Roslynator.Core.dll

Overloads

MethodSummary
AppendToLeadingTrivia(SyntaxToken, IEnumerable<SyntaxTrivia>)Creates a new token from this token with the leading trivia replaced with a new trivia where the specified trivia is added at the end of the leading trivia.
AppendToLeadingTrivia(SyntaxToken, SyntaxTrivia)Creates a new token from this token with the leading trivia replaced with a new trivia where the specified trivia is added at the end of the leading trivia.
AppendToLeadingTrivia<TNode>(TNode, IEnumerable<SyntaxTrivia>)Creates a new node from this node with the leading trivia replaced with a new trivia where the specified trivia is added at the end of the leading trivia.
AppendToLeadingTrivia<TNode>(TNode, SyntaxTrivia)Creates a new node from this node with the leading trivia replaced with a new trivia where the specified trivia is added at the end of the leading trivia.

AppendToLeadingTrivia(SyntaxToken, IEnumerable<SyntaxTrivia>)

Creates a new token from this token with the leading trivia replaced with a new trivia where the specified trivia is added at the end of the leading trivia.

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

Parameters

token SyntaxToken

trivia IEnumerable<SyntaxTrivia>

Returns

SyntaxToken

AppendToLeadingTrivia(SyntaxToken, SyntaxTrivia)

Creates a new token from this token with the leading trivia replaced with a new trivia where the specified trivia is added at the end of the leading trivia.

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

Parameters

token SyntaxToken

trivia SyntaxTrivia

Returns

SyntaxToken

AppendToLeadingTrivia<TNode>(TNode, IEnumerable<SyntaxTrivia>)

Creates a new node from this node with the leading trivia replaced with a new trivia where the specified trivia is added at the end of the leading trivia.

public static TNode AppendToLeadingTrivia<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

AppendToLeadingTrivia<TNode>(TNode, SyntaxTrivia)

Creates a new node from this node with the leading trivia replaced with a new trivia where the specified trivia is added at the end of the leading trivia.

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

Type Parameters

TNode

Parameters

node TNode

trivia SyntaxTrivia

Returns

TNode