30 references to WithLeadingTrivia
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (2)
34token = token.WithLeadingTrivia(SyntaxFactory.ElasticSpace); 38token = token.WithLeadingTrivia(SyntaxFactory.Space);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (7)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
655.WithLeadingTrivia(DocumentationCommentExterior("/**"))
src\Analyzers\CSharp\CodeFixes\MakeStatementAsynchronous\CSharpMakeStatementAsynchronousCodeFixProvider.cs (4)
71.WithForEachKeyword(forEach.ForEachKeyword.WithLeadingTrivia()) 76.WithForEachKeyword(forEachDeconstruction.ForEachKeyword.WithLeadingTrivia()) 81.WithUsingKeyword(usingStatement.UsingKeyword.WithLeadingTrivia()) 86.WithUsingKeyword(localDeclaration.UsingKeyword.WithLeadingTrivia())
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
561return currentToken.WithLeadingTrivia(Whitespace(preferredIndentation));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (1)
85tokenWithLeadingWhitespace = token.WithLeadingTrivia(SyntaxFactory.ElasticMarker).WithAdditionalAnnotations(Formatter.Annotation);
Microsoft.CodeAnalysis.CSharp.Features (7)
Organizing\Organizers\ModifiersOrganizer.cs (1)
23initialList[0] = initialList[0].WithLeadingTrivia();
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
655.WithLeadingTrivia(DocumentationCommentExterior("/**"))
src\Analyzers\CSharp\CodeFixes\MakeStatementAsynchronous\CSharpMakeStatementAsynchronousCodeFixProvider.cs (4)
71.WithForEachKeyword(forEach.ForEachKeyword.WithLeadingTrivia()) 76.WithForEachKeyword(forEachDeconstruction.ForEachKeyword.WithLeadingTrivia()) 81.WithUsingKeyword(usingStatement.UsingKeyword.WithLeadingTrivia()) 86.WithUsingKeyword(localDeclaration.UsingKeyword.WithLeadingTrivia())
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
561return currentToken.WithLeadingTrivia(Whitespace(preferredIndentation));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxFactoryTests.cs (1)
111SyntaxFactory.ParseToken(string.Format("\"{0}\"", value)).WithLeadingTrivia(SyntaxFactory.ElasticMarker).WithTrailingTrivia(SyntaxFactory.ElasticMarker);
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Simplification\CSharpSimplificationService.cs (1)
166tokenWithLeadingWhitespace = token.WithLeadingTrivia(SyntaxFactory.ElasticMarker).WithAdditionalAnnotations(Formatter.Annotation);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (2)
34token = token.WithLeadingTrivia(SyntaxFactory.ElasticSpace); 38token = token.WithLeadingTrivia(SyntaxFactory.Space);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (1)
85tokenWithLeadingWhitespace = token.WithLeadingTrivia(SyntaxFactory.ElasticMarker).WithAdditionalAnnotations(Formatter.Annotation);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CodeGeneration\CodeGenerationTests.VisualBasic.cs (1)
1475var newModifiers = new[] { VB.SyntaxFactory.Token(VB.SyntaxKind.FriendKeyword).WithLeadingTrivia(eol) }.Concat(
Microsoft.CodeAnalysis.Features (1)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaHelpers.cs (1)
239var newNextOfEnd = nextOfEnd.WithLeadingTrivia();
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SingleLineRewriter.vb (2)
25token = token.WithLeadingTrivia(SyntaxFactory.ElasticSpace) 27token = token.WithLeadingTrivia(SyntaxFactory.Space)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
EndConstructGeneration\EndConstructStatementVisitor_LambdaHeader.vb (1)
33Dim endStatement = SyntaxFactory.EndBlockStatement(endStatementKind, SyntaxFactory.Token(originalNode.SubOrFunctionHeader.DeclarationKeyword.Kind).WithLeadingTrivia(SyntaxFactory.WhitespaceTrivia(" "))) _
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (2)
TestSyntaxNodes.vb (2)
1707tk = tk.WithLeadingTrivia(SyntaxFactory.WhitespaceTrivia(" ")) 1710tk = tk.WithLeadingTrivia(SyntaxFactory.WhitespaceTrivia(" "))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SingleLineRewriter.vb (2)
25token = token.WithLeadingTrivia(SyntaxFactory.ElasticSpace) 27token = token.WithLeadingTrivia(SyntaxFactory.Space)