17 references to WithTrailingTrivia
Microsoft.CodeAnalysis (4)
Syntax\SyntaxNodeExtensions.cs (1)
408var newLast = last.WithTrailingTrivia(trivia);
Syntax\SyntaxNodeOrToken.cs (1)
421return AsToken().WithTrailingTrivia(trivia);
Syntax\SyntaxToken.cs (2)
488return this.WithTrailingTrivia((IEnumerable<SyntaxTrivia>)trivia); 496return this.WithTrailingTrivia((IEnumerable<SyntaxTrivia>?)trivia);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
158return token.WithTrailingTrivia(token.TrailingTrivia.Concat(trivia));
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
644openBracket = openBracket.WithTrailingTrivia(openBracket.TrailingTrivia.Skip(1));
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (1)
238semicolonToken = semicolonToken.WithTrailingTrivia(trailingTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
229=> token.WithTrailingTrivia(token.TrailingTrivia.FilterComments(addElasticMarker: true))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpIsAndCastCheckCodeFixProvider.cs (1)
92? newIf.ReplaceToken(newIf.CloseParenToken, newIf.CloseParenToken.WithTrailingTrivia(trivia))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
138openBrace = openBrace.WithTrailingTrivia(
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (1)
238semicolonToken = semicolonToken.WithTrailingTrivia(trailingTrivia);
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpIsAndCastCheckCodeFixProvider.cs (1)
92? newIf.ReplaceToken(newIf.CloseParenToken, newIf.CloseParenToken.WithTrailingTrivia(trivia))
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
229=> token.WithTrailingTrivia(token.TrailingTrivia.FilterComments(addElasticMarker: true))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
138openBrace = openBrace.WithTrailingTrivia(
Microsoft.CodeAnalysis.Features (2)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaHelpers.cs (2)
200return endToken.WithTrailingTrivia(trivia.InsertRange(index, pragmaTrivia)); 236newEndToken = newEndToken.WithTrailingTrivia(endToken.TrailingTrivia.Concat(nextOfEnd.LeadingTrivia));
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
158return token.WithTrailingTrivia(token.TrailingTrivia.Concat(trivia));