46 references to WithTrailingTrivia
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (2)
46token = token.WithTrailingTrivia(SyntaxFactory.ElasticSpace); 50token = token.WithTrailingTrivia(SyntaxFactory.Space);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
421: typeDeclaration.Keyword.WithTrailingTrivia(ElasticMarker), 423typeDeclaration.Identifier.WithTrailingTrivia(ElasticMarker),
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (2)
78.WithTrailingTrivia(SyntaxFactory.Space); 97replacementMap[colonToken] = colonToken.WithLeadingTrivia(thisBaseKeyword.LeadingTrivia).WithTrailingTrivia(SyntaxFactory.Space);
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeActionHelpers.cs (1)
49updatedDecl = updatedDecl.WithArrowToken(updatedDecl.ArrowToken.WithTrailingTrivia(ElasticSpace));
src\Analyzers\CSharp\CodeFixes\UseNullPropagation\CSharpUseNullPropagationCodeFixProvider.cs (1)
51.WithElseKeyword(elseClauseSyntax.ElseKeyword.WithTrailingTrivia())
Microsoft.CodeAnalysis.CSharp.Features (7)
ReplaceConditionalWithStatements\CSharpReplaceConditionalWithStatementsCodeRefactoringProvider.cs (1)
80variable.WithInitializer(null).WithIdentifier(variable.Identifier.WithTrailingTrivia()));
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
421: typeDeclaration.Keyword.WithTrailingTrivia(ElasticMarker), 423typeDeclaration.Identifier.WithTrailingTrivia(ElasticMarker),
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (2)
78.WithTrailingTrivia(SyntaxFactory.Space); 97replacementMap[colonToken] = colonToken.WithLeadingTrivia(thisBaseKeyword.LeadingTrivia).WithTrailingTrivia(SyntaxFactory.Space);
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeActionHelpers.cs (1)
49updatedDecl = updatedDecl.WithArrowToken(updatedDecl.ArrowToken.WithTrailingTrivia(ElasticSpace));
src\Analyzers\CSharp\CodeFixes\UseNullPropagation\CSharpUseNullPropagationCodeFixProvider.cs (1)
51.WithElseKeyword(elseClauseSyntax.ElseKeyword.WithTrailingTrivia())
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (10)
Syntax\SyntaxFactoryTests.cs (1)
111SyntaxFactory.ParseToken(string.Format("\"{0}\"", value)).WithLeadingTrivia(SyntaxFactory.ElasticMarker).WithTrailingTrivia(SyntaxFactory.ElasticMarker);
Syntax\SyntaxNodeTests.cs (9)
3562var emptyToken = SyntaxFactory.MissingToken(SyntaxKind.IdentifierToken).WithTrailingTrivia(emptyWhitespace, emptyWhitespace); 3856var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3865var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3874var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3883var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3892var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3901var withAsync = expression.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space)).ToString(); 3964var newAsync = SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space); 4002var replacedKeyword = SyntaxFactory.Token(SyntaxKind.StackAllocKeyword).WithTrailingTrivia(SyntaxFactory.Space);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (2)
46token = token.WithTrailingTrivia(SyntaxFactory.ElasticSpace); 50token = token.WithTrailingTrivia(SyntaxFactory.Space);
Microsoft.CodeAnalysis.Features (1)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaHelpers.cs (1)
238var newPreviousOfStart = previousOfStart.WithTrailingTrivia();
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SingleLineRewriter.vb (2)
33token = token.WithTrailingTrivia(SyntaxFactory.ElasticSpace) 35token = token.WithTrailingTrivia(SyntaxFactory.Space)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Analyzers\VisualBasic\CodeFixes\MakeMethodAsynchronous\VisualBasicMakeMethodAsynchronousCodeFixProvider.vb (1)
118subStatement.Identifier.WithTrailingTrivia(),
src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (1)
119SyntaxFactory.Token(SyntaxKind.OpenBraceToken).WithTrailingTrivia(SyntaxFactory.ElasticCarriageReturnLineFeed),
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
EndConstructGeneration\EndConstructStatementVisitor_LambdaHeader.vb (1)
85Dim newBody = SyntaxFactory.ReturnStatement(SyntaxFactory.Token(SyntaxKind.ReturnKeyword).WithTrailingTrivia(SyntaxFactory.WhitespaceTrivia(" ")),
Microsoft.CodeAnalysis.VisualBasic.Features (4)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
785Return Token(SyntaxKind.CommaToken).WithTrailingTrivia(ElasticSpace)
GenerateType\VisualBasicGenerateTypeService.vb (1)
643Dim lastTokenWithEndOfLineTrivia = lastToken.WithTrailingTrivia(SyntaxFactory.ElasticCarriageReturnLineFeed)
src\Analyzers\VisualBasic\CodeFixes\MakeMethodAsynchronous\VisualBasicMakeMethodAsynchronousCodeFixProvider.vb (1)
118subStatement.Identifier.WithTrailingTrivia(),
src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (1)
119SyntaxFactory.Token(SyntaxKind.OpenBraceToken).WithTrailingTrivia(SyntaxFactory.ElasticCarriageReturnLineFeed),
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (2)
Syntax\SyntaxNormalizerTests.vb (1)
791SyntaxFactory.Literal(1).WithTrailingTrivia(SyntaxFactory.Trivia(SyntaxFactory.SkippedTokensTrivia(SyntaxFactory.TokenList(SyntaxFactory.Literal("A"c)))))))))
TestSyntaxNodes.vb (1)
1711tk = tk.WithTrailingTrivia(SyntaxFactory.WhitespaceTrivia(" "))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (6)
CodeCleanup\AsyncOrIteratorFunctionReturnTypeFixer.vb (2)
166closeParenToken = closeParenToken.WithTrailingTrivia(SyntaxFactory.WhitespaceTrivia(" ")) 171closeParenToken = closeParenToken.WithTrailingTrivia(SyntaxFactory.WhitespaceTrivia(" "))
CodeCleanup\Providers\AddMissingTokensCodeCleanupProvider.vb (1)
234Dim previousTokenWithoutTrailingTrivia = previousToken.WithTrailingTrivia(SyntaxFactory.ElasticMarker)
CodeCleanup\Providers\FixIncorrectTokensCodeCleanupProvider.vb (1)
198Dim newEndKeyword = SyntaxFactory.Token(SyntaxKind.EndKeyword).WithTrailingTrivia(SyntaxFactory.WhitespaceTrivia(" "))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SingleLineRewriter.vb (2)
33token = token.WithTrailingTrivia(SyntaxFactory.ElasticSpace) 35token = token.WithTrailingTrivia(SyntaxFactory.Space)
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
Snippets\VisualBasicSnippetExpansionLanguageHelper.vb (1)
157SyntaxFactory.Token(SyntaxKind.ImportsKeyword).WithTrailingTrivia(SyntaxFactory.Space),