195 references to WithTrailingTrivia
Microsoft.AspNetCore.App.CodeFixes (1)
Authorization\AddAuthorizationBuilderFixer.cs (1)
129invocation.WithTrailingTrivia(newInvocationTrivia),
Microsoft.CodeAnalysis (1)
Syntax\SyntaxNodeExtensions.cs (1)
325return syntax.WithLeadingTrivia(node.GetLeadingTrivia()).WithTrailingTrivia(node.GetTrailingTrivia());
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
985return node.WithTrailingTrivia(other.GetTrailingTriviaIncludingMissingTokens());
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (1)
229newWhenTrueStatement = newWhenTrueStatement.WithTrailingTrivia(ifStatement.GetTrailingTrivia());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AddImportHelpers.cs (1)
82newImports[^1] = newImports[^1].WithTrailingTrivia(originalLastUsing.GetTrailingTrivia());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (1)
249.WithTrailingTrivia(state.VariableDeclarator.GetTrailingTrivia()));
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberAccessExpressionSyntaxExtensions.cs (1)
19.WithTrailingTrivia(memberAccess.GetTrailingTrivia());
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (36)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
386var openBraceToken = OpenBraceToken.WithoutLeadingTrivia().WithTrailingTrivia(fileScopedNamespace.SemicolonToken.TrailingTrivia);
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
320.WithTrailingTrivia(baseTrailingTrivia)));
src\Analyzers\CSharp\CodeFixes\DocumentationComments\CSharpAddDocCommentNodesCodeFixProvider.cs (1)
81return elementNode.WithTrailingTrivia(SyntaxFactory.ParseTrailingTrivia(Environment.NewLine));
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryCast\CSharpRemoveUnnecessaryCastCodeFixProvider.cs (1)
78return binaryExpression.Left.WithTrailingTrivia(binaryExpression.GetTrailingTrivia())
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (3)
104return TypePattern(declarationPattern.Type).WithTrailingTrivia(trailingTrivia); 152.WithTrailingTrivia(proposedReplacementNode.GetTrailingTrivia()); 163.WithTrailingTrivia(proposedReplacementNode.GetTrailingTrivia());
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
382.WithTrailingTrivia(TriviaList(trailingWhitespaceAndComments).AddRange(triviaAfterComma));
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
65nodesAndTokens.Add(expression.WithTrailingTrivia(trailingTrivia));
src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentCodeFixProvider.cs (1)
85newWhenTrueStatement = newWhenTrueStatement.WithTrailingTrivia(ifStatement.GetTrailingTrivia());
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (2)
202.WithTrailingTrivia(designation.GetTrailingTrivia()); 213.WithTrailingTrivia(parensDesignation.GetTrailingTrivia());
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\CSharpUseObjectInitializerCodeFixProvider.cs (1)
100newAssignment = newAssignment.WithTrailingTrivia(
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\UseInitializerHelpers.cs (1)
23.WithType(objectCreation.Type.WithTrailingTrivia(objectCreation.ArgumentList.GetTrailingTrivia()))
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
402.WithTrailingTrivia(baseType.GetTrailingTrivia()));
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
205SemicolonToken).WithTrailingTrivia(usingStatement.CloseParenToken.TrailingTrivia);
src\Analyzers\CSharp\CodeFixes\UseThrowExpression\UseThrowExpressionCodeFixProvider.cs (1)
77(current, _) => current.WithTrailingTrivia(throwStatement.GetTrailingTrivia()));
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (2)
200return stringLiteral.WithTrailingTrivia(trailingTrivia); 210.WithTrailingTrivia(trailingTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (13)
791.WithTrailingTrivia(delegateDeclarationSyntax.ReturnType.GetTrailingTrivia()); 799.WithTrailingTrivia(methodDeclarationSyntax.ReturnType.GetTrailingTrivia()); 807.WithTrailingTrivia(operatorDeclarationSyntax.ReturnType.GetTrailingTrivia()); 815.WithTrailingTrivia(conversionOperatorDeclarationSyntax.Type.GetTrailingTrivia()); 823.WithTrailingTrivia(propertyDeclaration.Type.GetTrailingTrivia()); 831.WithTrailingTrivia(eventDeclarationSyntax.Type.GetTrailingTrivia()); 839.WithTrailingTrivia(indexerDeclarationSyntax.Type.GetTrailingTrivia()); 851.WithTrailingTrivia(parameterSyntax.Type.GetTrailingTrivia()); 865.WithTrailingTrivia(incompleteMemberSyntax.Type.GetTrailingTrivia()); 875.WithTrailingTrivia(arrayTypeSyntax.ElementType.GetTrailingTrivia()); 883.WithTrailingTrivia(pointerTypeSyntax.ElementType.GetTrailingTrivia()); 891.WithTrailingTrivia(variableDeclarationSyntax.Type.GetTrailingTrivia()); 899.WithTrailingTrivia(catchDeclarationSyntax.Type.GetTrailingTrivia());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
119typeDeclaration = typeDeclaration.WithSemicolonToken(default).WithTrailingTrivia(typeDeclaration.SemicolonToken.TrailingTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
109right: declarationPattern.Type.WithTrailingTrivia(declarationPattern.GetTrailingTrivia()));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (2)
279.WithTrailingTrivia(propertyDeclaration.SemicolonToken.TrailingTrivia) 301return result.WithTrailingTrivia(accessorDeclaration.Body?.GetTrailingTrivia() ?? accessorDeclaration.SemicolonToken.TrailingTrivia);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (3)
432var newArgumentList = ArgumentList().WithTrailingTrivia(newKeywordToken.TrailingTrivia); 440var newArgumentList = ArgumentList().WithTrailingTrivia(typeNode.GetTrailingTrivia()); 449var newArgumentList = ArgumentList().WithTrailingTrivia(newKeywordToken.TrailingTrivia);
Microsoft.CodeAnalysis.CSharp.Features (29)
ChangeSignature\CSharpChangeSignatureService.cs (1)
384.WithTrailingTrivia(lambda.Parameter.GetTrailingTrivia());
ConvertCast\CSharpConvertTryCastToDirectCastCodeRefactoringProvider.cs (1)
64.WithTrailingTrivia(newTrailingTrivia);
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (1)
275.WithTrailingTrivia(propertyDeclaration.GetTrailingTrivia()));
Copilot\CSharpCopilotCodeFixProvider.cs (1)
130.WithTrailingTrivia(memberDeclaration.HasTrailingTrivia ? memberDeclaration.GetTrailingTrivia() : method.GetTrailingTrivia())
EncapsulateField\CSharpEncapsulateFieldService.cs (1)
79.WithTrailingTrivia(fieldSyntax.GetTrailingTrivia()));
IntroduceVariable\CSharpIntroduceVariableService.Rewriter.cs (1)
35.WithTrailingTrivia(expression.GetTrailingTrivia())
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
236.WithTrailingTrivia(oldBody.GetTrailingTrivia());
InvertIf\CSharpInvertIfCodeRefactoringProvider.cs (2)
148(trueStatement.WithTrailingTrivia(falseStatementOpt.GetTrailingTrivia()), 149falseStatementOpt.WithTrailingTrivia(trueStatement.GetTrailingTrivia()));
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (1)
188.WithTrailingTrivia(accessorDeclaration.Body.GetTrailingTrivia())
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
386var openBraceToken = OpenBraceToken.WithoutLeadingTrivia().WithTrailingTrivia(fileScopedNamespace.SemicolonToken.TrailingTrivia);
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
320.WithTrailingTrivia(baseTrailingTrivia)));
src\Analyzers\CSharp\CodeFixes\DocumentationComments\CSharpAddDocCommentNodesCodeFixProvider.cs (1)
81return elementNode.WithTrailingTrivia(SyntaxFactory.ParseTrailingTrivia(Environment.NewLine));
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryCast\CSharpRemoveUnnecessaryCastCodeFixProvider.cs (1)
78return binaryExpression.Left.WithTrailingTrivia(binaryExpression.GetTrailingTrivia())
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (3)
104return TypePattern(declarationPattern.Type).WithTrailingTrivia(trailingTrivia); 152.WithTrailingTrivia(proposedReplacementNode.GetTrailingTrivia()); 163.WithTrailingTrivia(proposedReplacementNode.GetTrailingTrivia());
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
382.WithTrailingTrivia(TriviaList(trailingWhitespaceAndComments).AddRange(triviaAfterComma));
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
65nodesAndTokens.Add(expression.WithTrailingTrivia(trailingTrivia));
src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentCodeFixProvider.cs (1)
85newWhenTrueStatement = newWhenTrueStatement.WithTrailingTrivia(ifStatement.GetTrailingTrivia());
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (2)
202.WithTrailingTrivia(designation.GetTrailingTrivia()); 213.WithTrailingTrivia(parensDesignation.GetTrailingTrivia());
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\CSharpUseObjectInitializerCodeFixProvider.cs (1)
100newAssignment = newAssignment.WithTrailingTrivia(
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\UseInitializerHelpers.cs (1)
23.WithType(objectCreation.Type.WithTrailingTrivia(objectCreation.ArgumentList.GetTrailingTrivia()))
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
402.WithTrailingTrivia(baseType.GetTrailingTrivia()));
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
205SemicolonToken).WithTrailingTrivia(usingStatement.CloseParenToken.TrailingTrivia);
src\Analyzers\CSharp\CodeFixes\UseThrowExpression\UseThrowExpressionCodeFixProvider.cs (1)
77(current, _) => current.WithTrailingTrivia(throwStatement.GetTrailingTrivia()));
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (2)
200return stringLiteral.WithTrailingTrivia(trailingTrivia); 210.WithTrailingTrivia(trailingTrivia);
Microsoft.CodeAnalysis.CSharp.Workspaces (29)
CodeGeneration\CSharpSyntaxGenerator.cs (4)
87.WithTrailingTrivia(trailingTrivia); 1784.WithParameterList(method.ParameterList.WithTrailingTrivia( 2236.WithTrailingTrivia(lambda.GetTrailingTrivia()); 3043var newNode = node.WithTrailingTrivia(node.GetTrailingTrivia().AddRange(previousToken.TrailingTrivia));
Simplification\CSharpSimplificationService.Expander.cs (3)
405.WithTrailingTrivia(node.GetTrailingTrivia())) 412.WithTrailingTrivia(node.GetTrailingTrivia())) 946.WithTrailingTrivia(rewrittenNode.GetTrailingTrivia());
Simplification\Reducers\CSharpMiscellaneousReducer.cs (1)
100newParameterSyntax.WithTrailingTrivia(parenthesizedLambda.ParameterList.GetTrailingTrivia()),
Simplification\Reducers\CSharpVarReducer.Rewriter.cs (1)
49.WithTrailingTrivia(typeSyntax.GetTrailingTrivia());
Simplification\Simplifiers\NameSimplifier.cs (2)
90.WithTrailingTrivia(genericName.GetTrailingTrivia()); 295.WithTrailingTrivia(name.GetTrailingTrivia());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberAccessExpressionSyntaxExtensions.cs (1)
19.WithTrailingTrivia(memberAccess.GetTrailingTrivia());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (13)
791.WithTrailingTrivia(delegateDeclarationSyntax.ReturnType.GetTrailingTrivia()); 799.WithTrailingTrivia(methodDeclarationSyntax.ReturnType.GetTrailingTrivia()); 807.WithTrailingTrivia(operatorDeclarationSyntax.ReturnType.GetTrailingTrivia()); 815.WithTrailingTrivia(conversionOperatorDeclarationSyntax.Type.GetTrailingTrivia()); 823.WithTrailingTrivia(propertyDeclaration.Type.GetTrailingTrivia()); 831.WithTrailingTrivia(eventDeclarationSyntax.Type.GetTrailingTrivia()); 839.WithTrailingTrivia(indexerDeclarationSyntax.Type.GetTrailingTrivia()); 851.WithTrailingTrivia(parameterSyntax.Type.GetTrailingTrivia()); 865.WithTrailingTrivia(incompleteMemberSyntax.Type.GetTrailingTrivia()); 875.WithTrailingTrivia(arrayTypeSyntax.ElementType.GetTrailingTrivia()); 883.WithTrailingTrivia(pointerTypeSyntax.ElementType.GetTrailingTrivia()); 891.WithTrailingTrivia(variableDeclarationSyntax.Type.GetTrailingTrivia()); 899.WithTrailingTrivia(catchDeclarationSyntax.Type.GetTrailingTrivia());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
119typeDeclaration = typeDeclaration.WithSemicolonToken(default).WithTrailingTrivia(typeDeclaration.SemicolonToken.TrailingTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
109right: declarationPattern.Type.WithTrailingTrivia(declarationPattern.GetTrailingTrivia()));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (2)
279.WithTrailingTrivia(propertyDeclaration.SemicolonToken.TrailingTrivia) 301return result.WithTrailingTrivia(accessorDeclaration.Body?.GetTrailingTrivia() ?? accessorDeclaration.SemicolonToken.TrailingTrivia);
Microsoft.CodeAnalysis.Features (3)
ChangeSignature\AbstractChangeSignatureService.cs (2)
1007updatedNodeList.Add(permutedParamNodes[index].WithLeadingTrivia(content.GetLeadingTrivia()).WithTrailingTrivia(content.GetTrailingTrivia())); 1017newDocComments = newDocComments.WithLeadingTrivia(structuredTrivia.GetLeadingTrivia()).WithTrailingTrivia(structuredTrivia.GetTrailingTrivia());
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (1)
408invocation = invocation.WithTrailingTrivia(_identifierName.GetTrailingTrivia());
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (9)
src\Analyzers\VisualBasic\CodeFixes\ConvertToAsync\VisualBasicConvertToAsyncFunctionCodeFixProvider.vb (2)
97.WithTrailingTrivia(methodNode.ParameterList.GetTrailingTrivia()), 104.WithTrailingTrivia(methodBlock.EndBlockStatement.GetTrailingTrivia()) _
src\Analyzers\VisualBasic\CodeFixes\MakeMethodAsynchronous\VisualBasicMakeMethodAsynchronousCodeFixProvider.vb (1)
110WithTrailingTrivia(
src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (1)
113newExpression = newExpression.WithTrailingTrivia(expressionStatement.GetTrailingTrivia())
src\Analyzers\VisualBasic\CodeFixes\UseObjectInitializer\UseInitializerHelpers.vb (2)
17objectCreation = objectCreation.WithType(objectCreation.Type.WithTrailingTrivia(objectCreation.ArgumentList.GetTrailingTrivia())). 23WithTrailingTrivia(objectCreation.GetTrailingTrivia())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (2)
112.WithTrailingTrivia(trailingTrivia) _ 120.WithTrailingTrivia(trailingTrivia) _
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\MemberAccessExpressionSyntaxExtensions.vb (1)
18.WithTrailingTrivia(memberAccess.GetTrailingTrivia())
Microsoft.CodeAnalysis.VisualBasic.Features (19)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
371Dim emptyArgumentList = SyntaxFactory.ArgumentList().WithTrailingTrivia(invocation.GetTrailingTrivia())
CodeFixes\CorrectNextControlVariable\CorrectNextControlVariableCodeFixProvider.vb (1)
64WithTrailingTrivia(nodeToReplace.GetTrailingTrivia())
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (2)
205.WithTrailingTrivia(exitStatement.GetTrailingTrivia()) _ 224.WithTrailingTrivia(continueStatement.GetTrailingTrivia()) _
CodeFixes\Suppression\VisualBasicSuppressionCodeFixProvider.vb (2)
251.WithTrailingTrivia(pragmaWarning.GetTrailingTrivia) 260.WithTrailingTrivia(pragmaWarning.GetTrailingTrivia)
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.vb (2)
358expression:=expression.WithTrailingTrivia(CType(Nothing, SyntaxTriviaList)), 359argumentList:=SyntaxFactory.ArgumentList().WithTrailingTrivia(trailingTrivia)) _
EncapsulateField\VisualBasicEncapsulateFieldService.vb (1)
60.WithTrailingTrivia(fieldDeclaration.GetTrailingTrivia()) _
IntroduceVariable\VisualBasicIntroduceVariableService.Rewriter.vb (1)
29WithTrailingTrivia(expression.GetTrailingTrivia()).
InvertIf\VisualBasicInvertIfCodeRefactoringProvider.SingleLine.vb (2)
61Dim newLastTrue = lastTrue.WithTrailingTrivia(lastFalse.GetTrailingTrivia()) 62Dim newLastFalse = lastFalse.WithTrailingTrivia(lastTrue.GetTrailingTrivia())
ReplaceMethodWithProperty\VisualBasicReplaceMethodWithPropertyService.vb (1)
161Return expression.ReplaceNode(rightName, newName.WithTrailingTrivia(currentRoot.GetTrailingTrivia()))
src\Analyzers\VisualBasic\CodeFixes\ConvertToAsync\VisualBasicConvertToAsyncFunctionCodeFixProvider.vb (2)
97.WithTrailingTrivia(methodNode.ParameterList.GetTrailingTrivia()), 104.WithTrailingTrivia(methodBlock.EndBlockStatement.GetTrailingTrivia()) _
src\Analyzers\VisualBasic\CodeFixes\MakeMethodAsynchronous\VisualBasicMakeMethodAsynchronousCodeFixProvider.vb (1)
110WithTrailingTrivia(
src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (1)
113newExpression = newExpression.WithTrailingTrivia(expressionStatement.GetTrailingTrivia())
src\Analyzers\VisualBasic\CodeFixes\UseObjectInitializer\UseInitializerHelpers.vb (2)
17objectCreation = objectCreation.WithType(objectCreation.Type.WithTrailingTrivia(objectCreation.ArgumentList.GetTrailingTrivia())). 23WithTrailingTrivia(objectCreation.GetTrailingTrivia())
Microsoft.CodeAnalysis.VisualBasic.Workspaces (21)
CodeCleanup\AsyncOrIteratorFunctionReturnTypeFixer.vb (2)
170asClauseOpt = asClauseOpt.WithTrailingTrivia(closeParenTrailingTrivia) 206.WithTrailingTrivia(trailingTrivia)
CodeCleanup\Providers\AddMissingTokensCodeCleanupProvider.vb (2)
269newParamList = newParamList.WithTrailingTrivia(n.ParameterList.GetTrailingTrivia) 279.WithTrailingTrivia(trailing), T)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
64WithTrailingTrivia(node.GetTrailingTrivia())
Simplification\Reducers\VisualBasicMiscellaneousReducer.vb (2)
55.WithTrailingTrivia(invocationExpression.GetTrailingTrivia()) 78.WithTrailingTrivia(objectCreationExpression.GetTrailingTrivia())
Simplification\Reducers\VisualBasicVariableDeclaratorReducer.vb (2)
104replacementNode = SyntaxFactory.VariableDeclarator(SyntaxFactory.SingletonSeparatedList(newModifiedIdentifier.WithTrailingTrivia(variableDeclarator.AsClause.GetTrailingTrivia())), 134replacementNode = newIdentifierName.WithTrailingTrivia(variableDeclarator.AsClause.GetTrailingTrivia()) ' Trailing Trivia is copied here
Simplification\Simplifiers\NameSimplifier.vb (1)
48replacementNode = SyntaxFactory.IdentifierName(genericName.Identifier).WithLeadingTrivia(genericName.GetLeadingTrivia()).WithTrailingTrivia(genericName.GetTrailingTrivia())
Simplification\VisualBasicSimplificationService.Expander.vb (8)
113Dim newAsClause = asClause.WithTrailingTrivia(newNode.Identifier.GetTrailingTrivia()) 114Dim newIdentifier = newNode.Identifier.WithTrailingTrivia({SyntaxFactory.WhitespaceTrivia(" ")}.ToSyntaxTriviaList()) 202.WithTrailingTrivia(SyntaxTriviaList.Empty) _ 203.WithArgumentList(SyntaxFactory.ArgumentList().WithTrailingTrivia(trailingTrivia)) _ 287.WithType(newObjectCreationExpression.Type.WithTrailingTrivia(SyntaxTriviaList.Empty)) _ 288.WithArgumentList(SyntaxFactory.ArgumentList().WithTrailingTrivia(trailingTrivia)) _ 694.WithTrailingTrivia(newNode.GetTrailingTrivia()) _ 741.WithTrailingTrivia(rewrittenNode.GetTrailingTrivia())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (2)
112.WithTrailingTrivia(trailingTrivia) _ 120.WithTrailingTrivia(trailingTrivia) _
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\MemberAccessExpressionSyntaxExtensions.vb (1)
18.WithTrailingTrivia(memberAccess.GetTrailingTrivia())
Microsoft.CodeAnalysis.Workspaces (5)
Editing\SyntaxGenerator.cs (2)
1067.WithTrailingTrivia(RemoveCommentLines(node.GetTrailingTrivia())); 1487.WithTrailingTrivia(replacement.GetTrailingTrivia().AddRange(original.GetTrailingTrivia()));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
985return node.WithTrailingTrivia(other.GetTrailingTriviaIncludingMissingTokens());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AddImportHelpers.cs (1)
82newImports[^1] = newImports[^1].WithTrailingTrivia(originalLastUsing.GetTrailingTrivia());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (1)
249.WithTrailingTrivia(state.VariableDeclarator.GetTrailingTrivia()));
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService.cs (4)
908.WithTrailingTrivia(SyntaxFactory.TriviaList(SyntaxFactory.ElasticMarker))); 917.WithTrailingTrivia(SyntaxFactory.TriviaList(SyntaxFactory.ElasticMarker))); 2782newEnumDeclaration = newEnumDeclaration.ReplaceNode(lastMember, lastMember.WithTrailingTrivia(trailingTrivia)); 3241enumDeclaration = enumDeclaration.ReplaceNode(lastMember, lastMember.WithTrailingTrivia(SyntaxTriviaList.Empty));
Microsoft.VisualStudio.LanguageServices.VisualBasic (29)
CodeModel\VisualBasicCodeModelService.vb (29)
968.WithTrailingTrivia(SyntaxFactory.TriviaList(SyntaxFactory.ElasticMarker))) 986.WithTrailingTrivia(SyntaxFactory.TriviaList(SyntaxFactory.ElasticMarker))) 2979.WithTrailingTrivia(SyntaxTriviaList.Empty) 3020.WithTrailingTrivia(trailingTrivia) 3032.WithTrailingTrivia(SyntaxTriviaList.Empty) 3053.WithTrailingTrivia(trailingTrivia) 3070.WithTrailingTrivia(SyntaxTriviaList.Empty) 3083.WithTrailingTrivia(trailingTrivia) 3108.WithTrailingTrivia(firstParameter.GetTrailingTrivia()) 3123newParameterList = newParameterList.WithTrailingTrivia(accessorBlock.BlockStatement.ParameterList.GetTrailingTrivia()) 3143.WithTrailingTrivia(SyntaxTriviaList.Empty) 3190Return declareStatement.WithLeadingTrivia(leadingTrivia).WithTrailingTrivia(trailingTrivia) 3199.WithTrailingTrivia(SyntaxTriviaList.Empty) 3244.WithTrailingTrivia(trailingTrivia) 3253.WithTrailingTrivia(SyntaxTriviaList.Empty) 3273.WithTrailingTrivia(trailingTrivia) 3286.WithTrailingTrivia(SyntaxTriviaList.Empty) 3302.WithTrailingTrivia(trailingTrivia) 3315.WithTrailingTrivia(SyntaxTriviaList.Empty) 3331.WithTrailingTrivia(trailingTrivia) 3344.WithTrailingTrivia(SyntaxTriviaList.Empty) 3372.WithTrailingTrivia(firstParameter.GetTrailingTrivia()) 3385.WithTrailingTrivia(trailingTrivia) 3398.WithTrailingTrivia(SyntaxTriviaList.Empty) 3414.WithTrailingTrivia(trailingTrivia) 3567variableDeclarator = variableDeclarator.WithTrailingTrivia(SyntaxTriviaList.Empty) 3573SyntaxFactory.EqualsValue(expression)).WithTrailingTrivia(trailingTrivia) 3589enumMemberDeclaration = enumMemberDeclaration.WithTrailingTrivia(SyntaxTriviaList.Empty) 3595SyntaxFactory.EqualsValue(expression)).WithTrailingTrivia(trailingTrivia)
System.Text.RegularExpressions.Generator (1)
UpgradeToGeneratedRegexCodeFixer.cs (1)
329=> method.WithLeadingTrivia(nodeToFix.GetLeadingTrivia()).WithTrailingTrivia(nodeToFix.GetTrailingTrivia());