36 references to WithLeadingTrivia
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\QualifyMemberAccess\AbstractQualifyMemberAccessCodeFixProvider.cs (1)
49node.WithLeadingTrivia())
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
883return SyntaxFactory.ReturnStatement(expression.WithLeadingTrivia(SyntaxFactory.ElasticSpace))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
188return declarationList.Insert(index, declaration.WithLeadingTrivia(ElasticCarriageReturnLineFeed));
Microsoft.CodeAnalysis.CSharp.Features (4)
ChangeSignature\CSharpChangeSignatureService.cs (1)
665.WithLeadingTrivia(ElasticSpace);
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (1)
124compilationRoot = compilationRoot.WithLeadingTrivia(Comment(GlobalSuppressionsFileHeaderComment));
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
503newStatement = newStatement.WithLeadingTrivia(indentation);
UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (1)
173? attributeList.WithLeadingTrivia(indentation)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Syntax\TrackNodeTests.cs (2)
69var newA = currentA.WithLeadingTrivia(SyntaxFactory.Comment("/* ayup */")); 84var newA = currentA.WithLeadingTrivia(SyntaxFactory.Comment("/* ayup */"));
Microsoft.CodeAnalysis.CSharp.Workspaces (9)
CodeGeneration\CSharpSyntaxGenerator.cs (4)
86docTrivia = docTrivia.WithLeadingTrivia(SyntaxFactory.DocumentationCommentExterior("/// ")) 979return node.WithLeadingTrivia(SyntaxFactory.ElasticMarker) 2833newNodes.Add(this.WithSubDeclarationsRemoved(multiPartDeclaration, 0, index + 1).WithLeadingTrivia(SyntaxFactory.ElasticSpace)); 2931newNodes.Add(this.WithSubDeclarationsRemoved(multiPartDeclaration, 0, index).WithLeadingTrivia(SyntaxFactory.ElasticSpace));
Simplification\CSharpSimplificationService.Expander.cs (3)
707(SimpleNameSyntax)newNode.WithLeadingTrivia(null)) 919(SimpleNameSyntax)rewrittenNode.WithLeadingTrivia(null)) 952rewrittenNode = rewrittenNode.WithLeadingTrivia(null);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
883return SyntaxFactory.ReturnStatement(expression.WithLeadingTrivia(SyntaxFactory.ElasticSpace))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
188return declarationList.Insert(index, declaration.WithLeadingTrivia(ElasticCarriageReturnLineFeed));
Microsoft.CodeAnalysis.Features (3)
ChangeSignature\AbstractChangeSignatureService.cs (2)
708param = param.WithLeadingTrivia(); 724newParameter = newParameter.WithLeadingTrivia();
src\Analyzers\Core\CodeFixes\QualifyMemberAccess\AbstractQualifyMemberAccessCodeFixProvider.cs (1)
49node.WithLeadingTrivia())
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (1)
105newExpression = newExpression.WithLeadingTrivia(SyntaxFactory.ElasticMarker)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (2)
EndConstructGeneration\EndConstructStatementVisitor_LambdaHeader.vb (1)
34.WithLeadingTrivia(SyntaxFactory.WhitespaceTrivia(aligningWhitespace)) _
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (1)
130statement = statement.WithLeadingTrivia(endOfLineTrivia, SyntaxFactory.CommentTrivia("' " & VBEditorResources.This_call_is_required_by_the_designer), endOfLineTrivia)
Microsoft.CodeAnalysis.VisualBasic.Features (2)
MetadataAsSource\VisualBasicMetadataAsSourceService.vb (1)
42Dim newRoot = oldRoot.WithLeadingTrivia({
src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (1)
105newExpression = newExpression.WithLeadingTrivia(SyntaxFactory.ElasticMarker)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (5)
CodeGeneration\VisualBasicSyntaxGenerator.vb (4)
63node = node.WithLeadingTrivia(SyntaxFactory.DocumentationCommentExteriorTrivia("''' ")). 1503Return node.WithLeadingTrivia(SyntaxFactory.ElasticMarker).WithTrailingTrivia(SyntaxFactory.ElasticMarker) 3518newNodes.Add(Me.WithSubDeclarationsRemoved(multiPartDeclaration, 0, index).WithLeadingTrivia(SyntaxFactory.ElasticSpace)) 3537newNodes.Add(Me.WithSubDeclarationsRemoved(declaration, 0, index + 1).WithLeadingTrivia(SyntaxFactory.ElasticSpace))
Simplification\VisualBasicSimplificationService.Expander.vb (1)
309WithLeadingTrivia().
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
Formatting\FormattingTests.vb (1)
4194Dim setPropertyStatement = SyntaxFactory.ParseExecutableStatement(String.Format("SetProperty({0}, value, ""{1}"")", "field", "Property")).WithLeadingTrivia(SyntaxFactory.ElasticMarker)
Microsoft.Interop.LibraryImportGenerator (1)
LibraryImportGenerator.cs (1)
376dllImport = dllImport.WithLeadingTrivia(Comment("// Local P/Invoke"));
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
270dllImport = dllImport.WithLeadingTrivia(Comment("// Local P/Invoke"));
System.Windows.Forms.Analyzers.CodeFixes.CSharp (1)
System\Windows\Forms\CSharp\CodeFixes\AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.cs (1)
132.WithLeadingTrivia(SyntaxFactory.CarriageReturnLineFeed)
System.Windows.Forms.Analyzers.CodeFixes.VisualBasic (1)
AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.vb (1)
148compilationUnit.WithLeadingTrivia(SyntaxFactory.CarriageReturnLineFeed))