Skip to main content

SyntaxExtensions.PrependToLeadingTrivia Method

Containing Type: SyntaxExtensions

Assembly: Roslynator.Core.dll

Overloads

MethodSummary
PrependToLeadingTrivia(SyntaxToken, IEnumerable<SyntaxTrivia>)Creates a new token from this token with the leading trivia replaced with a new trivia where the specified trivia is inserted at the beginning of the leading trivia.
PrependToLeadingTrivia(SyntaxToken, SyntaxTrivia)Creates a new token from this token with the leading trivia replaced with a new trivia where the specified trivia is inserted at the beginning of the leading trivia.
PrependToLeadingTrivia<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 inserted at the beginning of the leading trivia.
PrependToLeadingTrivia<TNode>(TNode, SyntaxTrivia)Creates a new node from this node with the leading trivia replaced with a new trivia where the specified trivia is inserted at the beginning of the leading trivia.

PrependToLeadingTrivia(SyntaxToken, IEnumerable<SyntaxTrivia>)

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

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

Parameters

token SyntaxToken

trivia IEnumerable<SyntaxTrivia>

Returns

SyntaxToken

PrependToLeadingTrivia(SyntaxToken, SyntaxTrivia)

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

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

Parameters

token SyntaxToken

trivia SyntaxTrivia

Returns

SyntaxToken

PrependToLeadingTrivia<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 inserted at the beginning of the leading trivia.

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

PrependToLeadingTrivia<TNode>(TNode, SyntaxTrivia)

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

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

Type Parameters

TNode

Parameters

node TNode

trivia SyntaxTrivia

Returns

TNode