191 references to WithTrailingTrivia
Microsoft.AspNetCore.App.CodeFixes (1)
Authorization\AddAuthorizationBuilderFixer.cs (1)
129
invocation.
WithTrailingTrivia
(newInvocationTrivia),
Microsoft.CodeAnalysis (1)
Syntax\SyntaxNodeExtensions.cs (1)
325
return syntax.WithLeadingTrivia(node.GetLeadingTrivia()).
WithTrailingTrivia
(node.GetTrailingTrivia());
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (1)
209
newWhenTrueStatement = newWhenTrueStatement.
WithTrailingTrivia
(ifStatement.GetTrailingTrivia());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AddImportHelpers.cs (1)
82
newImports[^1] = newImports[^1].
WithTrailingTrivia
(originalLastUsing.GetTrailingTrivia());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (1)
248
.
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 (34)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
386
var 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)
81
return elementNode.
WithTrailingTrivia
(SyntaxFactory.ParseTrailingTrivia(Environment.NewLine));
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryCast\CSharpRemoveUnnecessaryCastCodeFixProvider.cs (1)
78
return binaryExpression.Left.
WithTrailingTrivia
(binaryExpression.GetTrailingTrivia())
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (3)
104
return 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)
65
nodesAndTokens.Add(expression.
WithTrailingTrivia
(trailingTrivia));
src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentCodeFixProvider.cs (1)
85
newWhenTrueStatement = newWhenTrueStatement.
WithTrailingTrivia
(ifStatement.GetTrailingTrivia());
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (2)
193
.
WithTrailingTrivia
(designation.GetTrailingTrivia());
204
.
WithTrailingTrivia
(parensDesignation.GetTrailingTrivia());
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\CSharpUseObjectInitializerCodeFixProvider.cs (1)
82
newAssignment = 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)
359
.
WithTrailingTrivia
(baseType.GetTrailingTrivia()));
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
175
SemicolonToken).
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)
200
return stringLiteral.
WithTrailingTrivia
(trailingTrivia);
210
.
WithTrailingTrivia
(trailingTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (13)
767
.
WithTrailingTrivia
(delegateDeclarationSyntax.ReturnType.GetTrailingTrivia());
775
.
WithTrailingTrivia
(methodDeclarationSyntax.ReturnType.GetTrailingTrivia());
783
.
WithTrailingTrivia
(operatorDeclarationSyntax.ReturnType.GetTrailingTrivia());
791
.
WithTrailingTrivia
(conversionOperatorDeclarationSyntax.Type.GetTrailingTrivia());
799
.
WithTrailingTrivia
(propertyDeclaration.Type.GetTrailingTrivia());
807
.
WithTrailingTrivia
(eventDeclarationSyntax.Type.GetTrailingTrivia());
815
.
WithTrailingTrivia
(indexerDeclarationSyntax.Type.GetTrailingTrivia());
827
.
WithTrailingTrivia
(parameterSyntax.Type.GetTrailingTrivia());
841
.
WithTrailingTrivia
(incompleteMemberSyntax.Type.GetTrailingTrivia());
851
.
WithTrailingTrivia
(arrayTypeSyntax.ElementType.GetTrailingTrivia());
859
.
WithTrailingTrivia
(pointerTypeSyntax.ElementType.GetTrailingTrivia());
867
.
WithTrailingTrivia
(variableDeclarationSyntax.Type.GetTrailingTrivia());
875
.
WithTrailingTrivia
(catchDeclarationSyntax.Type.GetTrailingTrivia());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
119
typeDeclaration = typeDeclaration.WithSemicolonToken(default).
WithTrailingTrivia
(typeDeclaration.SemicolonToken.TrailingTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
103
right: declarationPattern.Type.
WithTrailingTrivia
(declarationPattern.GetTrailingTrivia()));
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (3)
432
var newArgumentList = ArgumentList().
WithTrailingTrivia
(newKeywordToken.TrailingTrivia);
440
var newArgumentList = ArgumentList().
WithTrailingTrivia
(typeNode.GetTrailingTrivia());
449
var newArgumentList = ArgumentList().
WithTrailingTrivia
(newKeywordToken.TrailingTrivia);
Microsoft.CodeAnalysis.CSharp.Features (31)
ChangeSignature\CSharpChangeSignatureService.cs (1)
382
.
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()));
InitializeParameter\InitializeParameterHelpers.cs (2)
173
.
WithTrailingTrivia
(propertyDeclaration.SemicolonToken.TrailingTrivia)
195
return result.
WithTrailingTrivia
(accessorDeclaration.Body?.GetTrailingTrivia() ?? accessorDeclaration.SemicolonToken.TrailingTrivia);
IntroduceVariable\CSharpIntroduceVariableService.Rewriter.cs (1)
34
.
WithTrailingTrivia
(expression.GetTrailingTrivia())
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
241
.
WithTrailingTrivia
(oldBody.GetTrailingTrivia());
InvertIf\CSharpInvertIfCodeRefactoringProvider.cs (2)
148
(trueStatement.
WithTrailingTrivia
(falseStatementOpt.GetTrailingTrivia()),
149
falseStatementOpt.
WithTrailingTrivia
(trueStatement.GetTrailingTrivia()));
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (1)
188
.
WithTrailingTrivia
(accessorDeclaration.Body.GetTrailingTrivia())
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
386
var 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)
81
return elementNode.
WithTrailingTrivia
(SyntaxFactory.ParseTrailingTrivia(Environment.NewLine));
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryCast\CSharpRemoveUnnecessaryCastCodeFixProvider.cs (1)
78
return binaryExpression.Left.
WithTrailingTrivia
(binaryExpression.GetTrailingTrivia())
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (3)
104
return 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)
65
nodesAndTokens.Add(expression.
WithTrailingTrivia
(trailingTrivia));
src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentCodeFixProvider.cs (1)
85
newWhenTrueStatement = newWhenTrueStatement.
WithTrailingTrivia
(ifStatement.GetTrailingTrivia());
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (2)
193
.
WithTrailingTrivia
(designation.GetTrailingTrivia());
204
.
WithTrailingTrivia
(parensDesignation.GetTrailingTrivia());
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\CSharpUseObjectInitializerCodeFixProvider.cs (1)
82
newAssignment = 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)
359
.
WithTrailingTrivia
(baseType.GetTrailingTrivia()));
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
175
SemicolonToken).
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)
200
return stringLiteral.
WithTrailingTrivia
(trailingTrivia);
210
.
WithTrailingTrivia
(trailingTrivia);
Microsoft.CodeAnalysis.CSharp.Workspaces (27)
CodeGeneration\CSharpSyntaxGenerator.cs (4)
86
.
WithTrailingTrivia
(trailingTrivia);
1807
.WithParameterList(method.ParameterList.
WithTrailingTrivia
(
2259
.
WithTrailingTrivia
(lambda.GetTrailingTrivia());
3077
var 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)
100
newParameterSyntax.
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)
767
.
WithTrailingTrivia
(delegateDeclarationSyntax.ReturnType.GetTrailingTrivia());
775
.
WithTrailingTrivia
(methodDeclarationSyntax.ReturnType.GetTrailingTrivia());
783
.
WithTrailingTrivia
(operatorDeclarationSyntax.ReturnType.GetTrailingTrivia());
791
.
WithTrailingTrivia
(conversionOperatorDeclarationSyntax.Type.GetTrailingTrivia());
799
.
WithTrailingTrivia
(propertyDeclaration.Type.GetTrailingTrivia());
807
.
WithTrailingTrivia
(eventDeclarationSyntax.Type.GetTrailingTrivia());
815
.
WithTrailingTrivia
(indexerDeclarationSyntax.Type.GetTrailingTrivia());
827
.
WithTrailingTrivia
(parameterSyntax.Type.GetTrailingTrivia());
841
.
WithTrailingTrivia
(incompleteMemberSyntax.Type.GetTrailingTrivia());
851
.
WithTrailingTrivia
(arrayTypeSyntax.ElementType.GetTrailingTrivia());
859
.
WithTrailingTrivia
(pointerTypeSyntax.ElementType.GetTrailingTrivia());
867
.
WithTrailingTrivia
(variableDeclarationSyntax.Type.GetTrailingTrivia());
875
.
WithTrailingTrivia
(catchDeclarationSyntax.Type.GetTrailingTrivia());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
119
typeDeclaration = typeDeclaration.WithSemicolonToken(default).
WithTrailingTrivia
(typeDeclaration.SemicolonToken.TrailingTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
103
right: declarationPattern.Type.
WithTrailingTrivia
(declarationPattern.GetTrailingTrivia()));
Microsoft.CodeAnalysis.Features (3)
ChangeSignature\AbstractChangeSignatureService.cs (2)
1007
updatedNodeList.Add(permutedParamNodes[index].WithLeadingTrivia(content.GetLeadingTrivia()).
WithTrailingTrivia
(content.GetTrailingTrivia()));
1017
newDocComments = newDocComments.WithLeadingTrivia(structuredTrivia.GetLeadingTrivia()).
WithTrailingTrivia
(structuredTrivia.GetTrailingTrivia());
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (1)
408
invocation = 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)
110
WithTrailingTrivia
(
src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (1)
113
newExpression = newExpression.
WithTrailingTrivia
(expressionStatement.GetTrailingTrivia())
src\Analyzers\VisualBasic\CodeFixes\UseObjectInitializer\UseInitializerHelpers.vb (2)
17
objectCreation = objectCreation.WithType(objectCreation.Type.
WithTrailingTrivia
(objectCreation.ArgumentList.GetTrailingTrivia())).
23
WithTrailingTrivia
(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)
369
Dim emptyArgumentList = SyntaxFactory.ArgumentList().
WithTrailingTrivia
(invocation.GetTrailingTrivia())
CodeFixes\CorrectNextControlVariable\CorrectNextControlVariableCodeFixProvider.vb (1)
64
WithTrailingTrivia
(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)
358
expression:=expression.
WithTrailingTrivia
(CType(Nothing, SyntaxTriviaList)),
359
argumentList:=SyntaxFactory.ArgumentList().
WithTrailingTrivia
(trailingTrivia)) _
EncapsulateField\VisualBasicEncapsulateFieldService.vb (1)
60
.
WithTrailingTrivia
(fieldDeclaration.GetTrailingTrivia()) _
IntroduceVariable\VisualBasicIntroduceVariableService.Rewriter.vb (1)
28
.
WithTrailingTrivia
(expression.GetTrailingTrivia()) _
InvertIf\VisualBasicInvertIfCodeRefactoringProvider.SingleLine.vb (2)
61
Dim newLastTrue = lastTrue.
WithTrailingTrivia
(lastFalse.GetTrailingTrivia())
62
Dim newLastFalse = lastFalse.
WithTrailingTrivia
(lastTrue.GetTrailingTrivia())
ReplaceMethodWithProperty\VisualBasicReplaceMethodWithPropertyService.vb (1)
161
Return 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)
110
WithTrailingTrivia
(
src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (1)
113
newExpression = newExpression.
WithTrailingTrivia
(expressionStatement.GetTrailingTrivia())
src\Analyzers\VisualBasic\CodeFixes\UseObjectInitializer\UseInitializerHelpers.vb (2)
17
objectCreation = objectCreation.WithType(objectCreation.Type.
WithTrailingTrivia
(objectCreation.ArgumentList.GetTrailingTrivia())).
23
WithTrailingTrivia
(objectCreation.GetTrailingTrivia())
Microsoft.CodeAnalysis.VisualBasic.Workspaces (21)
CodeCleanup\AsyncOrIteratorFunctionReturnTypeFixer.vb (2)
170
asClauseOpt = asClauseOpt.
WithTrailingTrivia
(closeParenTrailingTrivia)
206
.
WithTrailingTrivia
(trailingTrivia)
CodeCleanup\Providers\AddMissingTokensCodeCleanupProvider.vb (2)
269
newParamList = newParamList.
WithTrailingTrivia
(n.ParameterList.GetTrailingTrivia)
279
.
WithTrailingTrivia
(trailing), T)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
64
WithTrailingTrivia
(node.GetTrailingTrivia())
Simplification\Reducers\VisualBasicMiscellaneousReducer.vb (2)
55
.
WithTrailingTrivia
(invocationExpression.GetTrailingTrivia())
78
.
WithTrailingTrivia
(objectCreationExpression.GetTrailingTrivia())
Simplification\Reducers\VisualBasicVariableDeclaratorReducer.vb (2)
104
replacementNode = SyntaxFactory.VariableDeclarator(SyntaxFactory.SingletonSeparatedList(newModifiedIdentifier.
WithTrailingTrivia
(variableDeclarator.AsClause.GetTrailingTrivia())),
134
replacementNode = newIdentifierName.
WithTrailingTrivia
(variableDeclarator.AsClause.GetTrailingTrivia()) ' Trailing Trivia is copied here
Simplification\Simplifiers\NameSimplifier.vb (1)
48
replacementNode = SyntaxFactory.IdentifierName(genericName.Identifier).WithLeadingTrivia(genericName.GetLeadingTrivia()).
WithTrailingTrivia
(genericName.GetTrailingTrivia())
Simplification\VisualBasicSimplificationService.Expander.vb (8)
113
Dim newAsClause = asClause.
WithTrailingTrivia
(newNode.Identifier.GetTrailingTrivia())
114
Dim 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 (4)
Editing\SyntaxGenerator.cs (2)
1068
.
WithTrailingTrivia
(RemoveCommentLines(node.GetTrailingTrivia()));
1488
.
WithTrailingTrivia
(replacement.GetTrailingTrivia().AddRange(original.GetTrailingTrivia()));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AddImportHelpers.cs (1)
82
newImports[^1] = newImports[^1].
WithTrailingTrivia
(originalLastUsing.GetTrailingTrivia());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (1)
248
.
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)));
2782
newEnumDeclaration = newEnumDeclaration.ReplaceNode(lastMember, lastMember.
WithTrailingTrivia
(trailingTrivia));
3241
enumDeclaration = 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())
3123
newParameterList = newParameterList.
WithTrailingTrivia
(accessorBlock.BlockStatement.ParameterList.GetTrailingTrivia())
3143
.
WithTrailingTrivia
(SyntaxTriviaList.Empty)
3190
Return 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)
3567
variableDeclarator = variableDeclarator.
WithTrailingTrivia
(SyntaxTriviaList.Empty)
3573
SyntaxFactory.EqualsValue(expression)).
WithTrailingTrivia
(trailingTrivia)
3589
enumMemberDeclaration = enumMemberDeclaration.
WithTrailingTrivia
(SyntaxTriviaList.Empty)
3595
SyntaxFactory.EqualsValue(expression)).
WithTrailingTrivia
(trailingTrivia)
System.Text.RegularExpressions.Generator (1)
UpgradeToGeneratedRegexCodeFixer.cs (1)
329
=> method.WithLeadingTrivia(nodeToFix.GetLeadingTrivia()).
WithTrailingTrivia
(nodeToFix.GetTrailingTrivia());