49 references to WithTrailingTrivia
Microsoft.CodeAnalysis (3)
Syntax\SyntaxNodeExtensions.cs (2)
341=> token.WithTrailingTrivia(default(SyntaxTriviaList)) 396var newLast = last.WithTrailingTrivia(trivia);
Syntax\SyntaxToken.cs (1)
454return this.WithLeadingTrivia(token.LeadingTrivia).WithTrailingTrivia(token.TrailingTrivia);
Microsoft.CodeAnalysis.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
777return token.WithTrailingTrivia(default(SyntaxTriviaList));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
111=> token.WithLeadingTrivia(leading).WithTrailingTrivia(trailing);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\UseObjectInitializer\AbstractUseObjectInitializerCodeFixProvider.cs (1)
123currentToken = currentToken.WithTrailingTrivia(trailingTrivia);
Microsoft.CodeAnalysis.CSharp (4)
Syntax\CSharpSyntaxRewriter.cs (2)
94return trailing.Node != trailingTrivia ? token.WithTrailingTrivia(trailing) : token; 108return trailing.Node != trailingTrivia ? token.WithTrailingTrivia(trailing) : token;
Syntax\SyntaxFactory.cs (1)
1147token = token.WithTrailingTrivia(token.TrailingTrivia.Add(DocumentationCommentExterior("/// ")));
Syntax\SyntaxNormalizer.cs (1)
112tk = tk.WithTrailingTrivia(RewriteTrivia(
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (1)
107? previousToken.WithTrailingTrivia(allColonTrivia)
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (2)
66.WithTrailingTrivia(recordKeyword.TrailingTrivia); 69.WithTrailingTrivia(SyntaxFactory.TriviaList(remainingLeadingTrivia.Take(trailingTriviaTakeUntil)));
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
102.WithoutTrivia().WithTrailingTrivia(rightSideOfComparison.GetTrailingTrivia());
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
492.WithIdentifier(declarator.Identifier.WithTrailingTrivia(newLeadingTrivia))
Microsoft.CodeAnalysis.CSharp.Features (5)
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (1)
107? previousToken.WithTrailingTrivia(allColonTrivia)
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (2)
66.WithTrailingTrivia(recordKeyword.TrailingTrivia); 69.WithTrailingTrivia(SyntaxFactory.TriviaList(remainingLeadingTrivia.Take(trailingTriviaTakeUntil)));
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
102.WithoutTrivia().WithTrailingTrivia(rightSideOfComparison.GetTrailingTrivia());
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
492.WithIdentifier(declarator.Identifier.WithTrailingTrivia(newLeadingTrivia))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxNodeTests.cs (1)
3611emptyToken = emptyToken.WithLeadingTrivia(emptyTriviaList).WithTrailingTrivia(emptyTriviaList);
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
3044var newPreviousToken = previousToken.WithTrailingTrivia(default(SyntaxTriviaList));
Rename\CSharpRenameRewriterLanguageService.cs (1)
728newToken = newToken.WithTrailingTrivia(updatedToken.TrailingTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (1)
45members.Add(CommaToken.WithTrailingTrivia(trailingTrivia));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
71.WithSemicolonToken(SemicolonToken.WithTrailingTrivia(newPropertyDeclaration.GetTrailingTrivia()))
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Formatting\FormattingTriviaTests.cs (1)
1787.Where(tr => tr.IsKind(SyntaxKind.EndOfDirectiveToken)), (o, r) => o.WithTrailingTrivia(o.LeadingTrivia.Add(SyntaxFactory.ElasticEndOfLine(newLine)))
Microsoft.CodeAnalysis.Features (3)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (1)
115: token.WithTrailingTrivia(triviaList);
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (1)
143.WithTrailingTrivia(pieces.Last().GetTrailingTrivia());
src\Analyzers\Core\CodeFixes\UseObjectInitializer\AbstractUseObjectInitializerCodeFixProvider.cs (1)
123currentToken = currentToken.WithTrailingTrivia(trailingTrivia);
Microsoft.CodeAnalysis.VisualBasic (3)
Syntax\SyntaxFactory.vb (1)
872token = token.WithTrailingTrivia(token.TrailingTrivia.Add(DocumentationCommentExteriorTrivia("''' ")))
Syntax\SyntaxNormalizer.vb (1)
153newToken = newToken.WithTrailingTrivia(
Syntax\VisualBasicSyntaxRewriter.vb (1)
53token = token.WithTrailingTrivia(trailing)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (1)
110WithTrailingTrivia(expressionStatement.GetTrailingTrivia())
Microsoft.CodeAnalysis.VisualBasic.Features (4)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (2)
201.WithTrailingTrivia(exitStatement.BlockKeyword.TrailingTrivia) 220.WithTrailingTrivia(continueStatement.BlockKeyword.TrailingTrivia)
ConvertForEachToFor\VisualBasicConvertForEachToForCodeRefactoringProvider.vb (1)
86.WithTrailingTrivia(controlVariable.GetLastToken().TrailingTrivia)), ExpressionSyntax)
src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (1)
110WithTrailingTrivia(expressionStatement.GetTrailingTrivia())
Microsoft.CodeAnalysis.VisualBasic.Workspaces (3)
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (2)
279Return SyntaxFactory.ParseToken(expectedText).WithLeadingTrivia(token.LeadingTrivia).WithTrailingTrivia(token.TrailingTrivia) 294Return SyntaxFactory.ParseToken(expectedText).WithLeadingTrivia(token.LeadingTrivia).WithTrailingTrivia(token.TrailingTrivia)
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
659newToken = newToken.WithTrailingTrivia(updatedToken.TrailingTrivia)
Microsoft.CodeAnalysis.Workspaces (5)
Editing\SyntaxGenerator.cs (2)
1073.WithTrailingTrivia(RemoveCommentLines(token.TrailingTrivia)); 1502.WithTrailingTrivia(replacement.TrailingTrivia.AddRange(original.TrailingTrivia));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
777return token.WithTrailingTrivia(default(SyntaxTriviaList));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
111=> token.WithLeadingTrivia(leading).WithTrailingTrivia(trailing);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
564.WithTrailingTrivia(modifier.TrailingTrivia);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
VisualStudioMSBuildWorkspaceTests.cs (1)
341var newDecl = decl.WithIdentifier(CS.SyntaxFactory.Identifier("Pogrom").WithLeadingTrivia(decl.Identifier.LeadingTrivia).WithTrailingTrivia(decl.Identifier.TrailingTrivia));
Microsoft.VisualStudio.LanguageServices.CSharp (3)
CodeModel\CSharpCodeModelService.cs (3)
2347newBody = newBody.WithCloseBraceToken(newBody.CloseBraceToken.WithTrailingTrivia(method.SemicolonToken.TrailingTrivia)); 2367newBody = newBody.WithCloseBraceToken(newBody.CloseBraceToken.WithTrailingTrivia(accessor.SemicolonToken.TrailingTrivia)); 3247return enumDeclaration.ReplaceToken(separator, separator.WithTrailingTrivia(trailingTrivia));