20 references to WithTrailingTrivia
Microsoft.CodeAnalysis (3)
Syntax\SyntaxNodeExtensions.cs (2)
417return node.WithTrailingTrivia((IEnumerable<SyntaxTrivia>?)null); 427return node.WithTrailingTrivia((IEnumerable<SyntaxTrivia>?)trivia);
Syntax\SyntaxNodeOrToken.cs (1)
426return _nodeOrParent.WithTrailingTrivia(trivia);
Microsoft.CodeAnalysis.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (2)
743return node.WithTrailingTrivia(node.GetTrailingTrivia().Concat(trivia)); 761return node.WithLeadingTrivia(leadingTrivia).WithTrailingTrivia(trailingTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (1)
350.WithTrailingTrivia(trailingTrivia);
Microsoft.CodeAnalysis.CSharp (1)
Syntax\SyntaxNodeRemover.cs (1)
42result = result.WithTrailingTrivia(result.GetTrailingTrivia().Concat(residualTrivia));
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
883.WithTrailingTrivia( 888.WithTrailingTrivia(node.GetTrailingTrivia().FilterComments(addElasticMarker: true))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
375fileScopedNamespace = fileScopedNamespace.WithTrailingTrivia(
src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (1)
157return newStatement.WithTrailingTrivia(expressionTriviaWithoutEndOfLine.Concat(ifStatementTrivia));
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
375fileScopedNamespace = fileScopedNamespace.WithTrailingTrivia(
src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (1)
157return newStatement.WithTrailingTrivia(expressionTriviaWithoutEndOfLine.Concat(ifStatementTrivia));
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
883.WithTrailingTrivia( 888.WithTrailingTrivia(node.GetTrailingTrivia().FilterComments(addElasticMarker: true))
Microsoft.CodeAnalysis.Features (1)
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (1)
497newTrailing[^1] = newTrailing[^1].WithTrailingTrivia(trailingTrivia);
Microsoft.CodeAnalysis.Workspaces (4)
Editing\SyntaxGenerator.cs (1)
1480.WithTrailingTrivia(changedNode.GetTrailingTrivia().Concat(node.GetTrailingTrivia()));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (2)
743return node.WithTrailingTrivia(node.GetTrailingTrivia().Concat(trivia)); 761return node.WithLeadingTrivia(leadingTrivia).WithTrailingTrivia(trailingTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (1)
350.WithTrailingTrivia(trailingTrivia);