142 references to GetLeadingTrivia
Microsoft.AspNetCore.App.Analyzers (1)
RouteEmbeddedLanguage\Infrastructure\RouteStringSyntaxDetector.cs (1)
167if (HasLanguageComment(node.GetLeadingTrivia(), out identifier, out options))
Microsoft.CodeAnalysis (5)
SourceGeneration\GeneratedCodeUtilities.cs (2)
92var leadingTrivia = root.GetLeadingTrivia(); 123var leadingTrivia = root.GetLeadingTrivia();
Syntax\SyntaxNode.cs (1)
565return this.GetLeadingTrivia().Count > 0;
Syntax\SyntaxNodeExtensions.cs (1)
325return syntax.WithLeadingTrivia(node.GetLeadingTrivia()).WithTrailingTrivia(node.GetTrailingTrivia());
Syntax\SyntaxNodeOrToken.cs (1)
367return _nodeOrParent.GetLeadingTrivia();
Microsoft.CodeAnalysis.CodeStyle (10)
src\Analyzers\Core\Analyzers\UseConditionalExpression\UseConditionalExpressionHelpers.cs (1)
65=> HasRegularCommentTrivia(syntaxFacts, syntax.GetLeadingTrivia()) ||
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
92var leadingTrivia = root.GetLeadingTrivia(); 123var leadingTrivia = root.GetLeadingTrivia();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
709return node.WithLeadingTrivia(trivia.Concat(node.GetLeadingTrivia()));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (2)
84var leadingTriviaToKeep = new List<SyntaxTrivia>(node.GetLeadingTrivia()); 112var leadingTrivia = node.GetLeadingTrivia();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\IFileBannerFactsExtensions.cs (1)
16return node.GetLeadingTrivia().Skip(leadingBlankLines.Length).ToImmutableArray();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
54var leadingTrivia = documentationComment.GetLeadingTrivia();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (2)
341.Concat(operand.GetLeadingTrivia()); 355if (resultNode.GetLeadingTrivia().Count == 0)
Microsoft.CodeAnalysis.CodeStyle.Fixes (14)
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
37var docCommentNode = TryGetDocCommentNode(parentMethod.GetLeadingTrivia());
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (2)
97var triviaList = root.GetLeadingTrivia(); 181var leadingTrivia = root.GetLeadingTrivia();
src\Analyzers\Core\CodeFixes\QualifyMemberAccess\AbstractQualifyMemberAccessCodeFixProvider.cs (1)
50.WithLeadingTrivia(node.GetLeadingTrivia());
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
713var leadingTrivia = insertionNode.GetLeadingTrivia();
src\Analyzers\Core\CodeFixes\UseConditionalExpression\UseConditionalExpressionHelpers.cs (1)
19if (HasRegularCommentTrivia(syntaxFacts, syntax.GetLeadingTrivia()))
src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (3)
187if (newWhenTrueStatement.GetLeadingTrivia().Any(syntaxFacts.IsRegularComment)) 190.WithPrependedLeadingTrivia(ifStatement.GetLeadingTrivia()) 202newWhenTrueStatement = newWhenTrueStatement.WithLeadingTrivia(ifStatement.GetLeadingTrivia());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (2)
507var leading = attributeList.GetLeadingTrivia(); 529var leading = isComma(previousToken) ? previousToken.LeadingTrivia : attributeToRemove.GetLeadingTrivia();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
174var leadingTrivia = node.GetLeadingTrivia().Where(trivia => !trivia.IsDirective);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\AddParameterEditor.cs (1)
131foreach (var trivia in node.GetLeadingTrivia().Reverse())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AddImportHelpers.cs (1)
74newImports[0] = newImports[0].WithLeadingTrivia(originalFirstUsing.GetLeadingTrivia());
Microsoft.CodeAnalysis.CSharp (5)
Syntax\SyntaxNodeRemover.cs (5)
297this.AddResidualTrivia(node.GetLeadingTrivia()); 301this.AddEndOfLine(GetEndOfLine(node.GetLeadingTrivia())); 331this.AddResidualTrivia(node.GetLeadingTrivia()); 369this.AddResidualTrivia(node.GetLeadingTrivia()); 373this.AddEndOfLine(GetEndOfLine(node.GetLeadingTrivia()));
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (4)
603var hasLeadingDirective = node.GetLeadingTrivia().Any(t => SyntaxFacts.IsPreprocessorDirective(t.Kind())); 882.WithLeadingTrivia(leadingTrivia.Concat(node.GetLeadingTrivia()).FilterComments(addElasticMarker: false)) 889.WithLeadingTrivia(node.GetLeadingTrivia().FilterComments(addElasticMarker: true)); 896var finalTrivia = from.GetLeadingTrivia().ToList();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (1)
177=> node.WithLeadingTrivia(node.GetLeadingTrivia().SkipWhile(t => t.Kind() == SyntaxKind.EndOfLineTrivia));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (9)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
695var potentialDocComment = declaration.GetLeadingTrivia().FirstOrNull(trivia => trivia.IsDocComment());
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
129=> node.WithLeadingTrivia(node.GetLeadingTrivia().Insert(0, trivia));
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (1)
96var triviaToAppend = newNameNode.GetLeadingTrivia().AddRange(newNameNode.GetTrailingTrivia());
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (2)
320var leadingTrivia = p.GetLeadingTrivia(); 333=> node.GetLeadingTrivia() is [.., (kind: SyntaxKind.WhitespaceTrivia) whitespace] ? whitespace.ToString() : "";
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (1)
35=> GetDocComment(node.GetLeadingTrivia());
src\Analyzers\CSharp\CodeFixes\UseThrowExpression\UseThrowExpressionCodeFixProvider.cs (1)
71(current, _) => current.WithLeadingTrivia(current.GetLeadingTrivia().Concat(throwStatement.GetTrailingTrivia())));
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
185return CreateUtf8String(nodeToTakeTriviaFrom.GetLeadingTrivia(), stringValue, nodeToTakeTriviaFrom.GetTrailingTrivia(), isConvertedToReadOnlySpan);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
253if (!info.Context.GenerateDocumentationComments || node.GetLeadingTrivia().Any(t => t.IsDocComment()))
Microsoft.CodeAnalysis.CSharp.Features (16)
ChangeSignature\CSharpChangeSignatureService.cs (1)
676var oldTrivia = oldArgument.GetLeadingTrivia();
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (1)
156var leadingTrivia = node.GetLeadingTrivia();
Copilot\CSharpCopilotCodeFixProvider.cs (1)
129.WithLeadingTrivia(memberDeclaration.HasLeadingTrivia ? memberDeclaration.GetLeadingTrivia() : method.GetLeadingTrivia())
DocumentationComments\DocCommentConverter.cs (2)
48if (node.GetLeadingTrivia().Any(SyntaxKind.SingleLineDocumentationCommentTrivia)) 52foreach (var trivia in node.GetLeadingTrivia())
ExtractMethod\CSharpMethodExtractor.cs (1)
177var leadingTrivia = methodDefinition.GetLeadingTrivia();
Organizing\Organizers\MemberDeclarationsOrganizer.cs (1)
104finalFirstNode = finalFirstNode.WithLeadingTrivia(banner.Concat(finalFirstNode.GetLeadingTrivia()));
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
695var potentialDocComment = declaration.GetLeadingTrivia().FirstOrNull(trivia => trivia.IsDocComment());
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
129=> node.WithLeadingTrivia(node.GetLeadingTrivia().Insert(0, trivia));
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (1)
96var triviaToAppend = newNameNode.GetLeadingTrivia().AddRange(newNameNode.GetTrailingTrivia());
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (2)
320var leadingTrivia = p.GetLeadingTrivia(); 333=> node.GetLeadingTrivia() is [.., (kind: SyntaxKind.WhitespaceTrivia) whitespace] ? whitespace.ToString() : "";
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (1)
35=> GetDocComment(node.GetLeadingTrivia());
src\Analyzers\CSharp\CodeFixes\UseThrowExpression\UseThrowExpressionCodeFixProvider.cs (1)
71(current, _) => current.WithLeadingTrivia(current.GetLeadingTrivia().Concat(throwStatement.GetTrailingTrivia())));
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
185return CreateUtf8String(nodeToTakeTriviaFrom.GetLeadingTrivia(), stringValue, nodeToTakeTriviaFrom.GetTrailingTrivia(), isConvertedToReadOnlySpan);
Structure\CSharpStructureHelpers.cs (1)
226var triviaList = node.GetLeadingTrivia();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (8)
Parsing\ScriptParsingTests.cs (1)
9665trivia = statement.GetLeadingTrivia().Single();
Syntax\SyntaxNodeTests.cs (5)
3740Assert.Equal(1, namedNode.GetLeadingTrivia().Count); 3741Assert.Equal(0, namedNode.GetLeadingTrivia().Span.Length); // zero-width elastic trivia 3749Assert.Equal(0, namedNode.GetLeadingTrivia().Count); 3756Assert.Equal(1, namedNode.GetLeadingTrivia().Count); 3757Assert.Equal(1, namedNode.GetLeadingTrivia().Span.Length);
Syntax\SyntaxRewriterTests.cs (2)
467var leadingTrivia = root.GetLeadingTrivia(); 494var leadingTrivia = root.GetLeadingTrivia();
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (4)
603var hasLeadingDirective = node.GetLeadingTrivia().Any(t => SyntaxFacts.IsPreprocessorDirective(t.Kind())); 882.WithLeadingTrivia(leadingTrivia.Concat(node.GetLeadingTrivia()).FilterComments(addElasticMarker: false)) 889.WithLeadingTrivia(node.GetLeadingTrivia().FilterComments(addElasticMarker: true)); 896var finalTrivia = from.GetLeadingTrivia().ToList();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (1)
177=> node.WithLeadingTrivia(node.GetLeadingTrivia().SkipWhile(t => t.Kind() == SyntaxKind.EndOfLineTrivia));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
253if (!info.Context.GenerateDocumentationComments || node.GetLeadingTrivia().Any(t => t.IsDocComment()))
Microsoft.CodeAnalysis.Features (22)
ChangeSignature\AbstractChangeSignatureService.cs (3)
978foreach (var trivia in node.GetLeadingTrivia()) 1007updatedNodeList.Add(permutedParamNodes[index].WithLeadingTrivia(content.GetLeadingTrivia()).WithTrailingTrivia(content.GetTrailingTrivia())); 1017newDocComments = newDocComments.WithLeadingTrivia(structuredTrivia.GetLeadingTrivia()).WithTrailingTrivia(structuredTrivia.GetTrailingTrivia());
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeNamespaceScopeEditor.cs (1)
98syntaxNode = syntaxNode.WithLeadingTrivia(syntaxNode.GetLeadingTrivia().Select(SyntaxTriviaExtensions.AsElastic));
ConvertAutoPropertyToFullProperty\AbstractConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
96.WithLeadingTrivia(property.GetLeadingTrivia());
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (1)
48.WithLeadingTrivia(ifStatement.GetLeadingTrivia())
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (1)
129.WithLeadingTrivia(pieces.First().GetLeadingTrivia());
EmbeddedLanguages\EmbeddedLanguageDetector.cs (1)
105if (HasLanguageComment(node.GetLeadingTrivia(), syntaxFacts, out identifier, out options))
IntroduceVariable\AbstractIntroduceLocalForExpressionCodeRefactoringProvider.cs (1)
93localStatement = localStatement.WithLeadingTrivia(expression.GetLeadingTrivia());
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (2)
494var leadingTrivia = GetLeadingSpace(statementsAfterIf[0].GetLeadingTrivia()).Concat(GetTriviaAfterSpace(newTrailing[0].GetLeadingTrivia()));
RemoveUnusedVariable\AbstractRemoveUnusedVariableCodeFixProvider.cs (1)
137if (localDeclaration.GetLeadingTrivia().Contains(t => t.IsDirective))
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (1)
396newIdentifierName = newIdentifierName.WithLeadingTrivia(_identifierName.GetLeadingTrivia());
src\Analyzers\Core\Analyzers\UseConditionalExpression\UseConditionalExpressionHelpers.cs (1)
65=> HasRegularCommentTrivia(syntaxFacts, syntax.GetLeadingTrivia()) ||
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (2)
97var triviaList = root.GetLeadingTrivia(); 181var leadingTrivia = root.GetLeadingTrivia();
src\Analyzers\Core\CodeFixes\QualifyMemberAccess\AbstractQualifyMemberAccessCodeFixProvider.cs (1)
50.WithLeadingTrivia(node.GetLeadingTrivia());
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
713var leadingTrivia = insertionNode.GetLeadingTrivia();
src\Analyzers\Core\CodeFixes\UseConditionalExpression\UseConditionalExpressionHelpers.cs (1)
19if (HasRegularCommentTrivia(syntaxFacts, syntax.GetLeadingTrivia()))
src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (2)
190.WithPrependedLeadingTrivia(ifStatement.GetLeadingTrivia()) 202newWhenTrueStatement = newWhenTrueStatement.WithLeadingTrivia(ifStatement.GetLeadingTrivia());
UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
312var hasDirective = nodeToRemove.GetLeadingTrivia().Any(t => t.IsDirective);
Microsoft.CodeAnalysis.VisualBasic (7)
Compilation\DocumentationComments\DocumentationCommentCompiler.Common.vb (1)
680For Each trivia In syntaxNode.GetLeadingTrivia()
Syntax\SyntaxNodeRemover.vb (6)
213Me.AddResidualTrivia(node.GetLeadingTrivia()) 214ElseIf (Me._options And SyntaxRemoveOptions.KeepEndOfLine) <> 0 AndAlso HasEndOfLine(node.GetLeadingTrivia()) Then 237Me.AddResidualTrivia(node.GetLeadingTrivia()) 239(HasEndOfLine(token.LeadingTrivia) OrElse HasEndOfLine(token.TrailingTrivia) OrElse HasEndOfLine(node.GetLeadingTrivia())) Then 262Me.AddResidualTrivia(node.GetLeadingTrivia()) 263ElseIf (Me._options And SyntaxRemoveOptions.KeepEndOfLine) <> 0 AndAlso HasEndOfLine(node.GetLeadingTrivia()) Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationHelpers.vb (1)
182If Not options.Context.GenerateDocumentationComments OrElse node.GetLeadingTrivia().Any(Function(t) t.IsKind(SyntaxKind.DocumentationCommentTrivia)) Then
Microsoft.CodeAnalysis.VisualBasic.Features (5)
CodeFixes\OverloadBase\OverloadBaseCodeFixProvider.AddKeywordAction.vb (1)
55Dim trivia As SyntaxTriviaList = node.GetLeadingTrivia()
Completion\KeywordRecommenders\PreprocessorDirectives\PreprocessorHelpers.vb (1)
38For Each leadingTrivia In node.GetLeadingTrivia()
MetadataAsSource\VisualBasicMetadataAsSourceService.vb (2)
173If node.GetLeadingTrivia().Any(SyntaxKind.DocumentationCommentTrivia) Then 176For Each trivia In node.GetLeadingTrivia()
Structure\VisualBasicStructureHelpers.vb (1)
87Dim triviaList = node.GetLeadingTrivia()
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (3)
Syntax\ManualTests.vb (2)
117Assert.Equal(1, node.GetLeadingTrivia().Count) 119Assert.Equal(" ", node.GetLeadingTrivia().First().ToString())
TestSyntaxNodes.vb (1)
331Dim precedingTrivia = tree.GetLeadingTrivia(), followingTrivia = tree.GetTrailingTrivia()
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationHelpers.vb (1)
182If Not options.Context.GenerateDocumentationComments OrElse node.GetLeadingTrivia().Any(Function(t) t.IsKind(SyntaxKind.DocumentationCommentTrivia)) Then
Microsoft.CodeAnalysis.Workspaces (19)
Editing\SyntaxGenerator.cs (5)
1067return node.WithLeadingTrivia(RemoveCommentLines(node.GetLeadingTrivia())) 1480.WithLeadingTrivia(node.GetLeadingTrivia().Concat(changedNode.GetLeadingTrivia())) 1487replacement.WithLeadingTrivia(original.GetLeadingTrivia().AddRange(replacement.GetLeadingTrivia()))
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
92var leadingTrivia = root.GetLeadingTrivia(); 123var leadingTrivia = root.GetLeadingTrivia();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
709return node.WithLeadingTrivia(trivia.Concat(node.GetLeadingTrivia()));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (2)
84var leadingTriviaToKeep = new List<SyntaxTrivia>(node.GetLeadingTrivia()); 112var leadingTrivia = node.GetLeadingTrivia();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\IFileBannerFactsExtensions.cs (1)
16return node.GetLeadingTrivia().Skip(leadingBlankLines.Length).ToImmutableArray();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
54var leadingTrivia = documentationComment.GetLeadingTrivia();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (2)
341.Concat(operand.GetLeadingTrivia()); 355if (resultNode.GetLeadingTrivia().Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (2)
507var leading = attributeList.GetLeadingTrivia(); 529var leading = isComma(previousToken) ? previousToken.LeadingTrivia : attributeToRemove.GetLeadingTrivia();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
174var leadingTrivia = node.GetLeadingTrivia().Where(trivia => !trivia.IsDirective);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\AddParameterEditor.cs (1)
131foreach (var trivia in node.GetLeadingTrivia().Reverse())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AddImportHelpers.cs (1)
74newImports[0] = newImports[0].WithLeadingTrivia(originalFirstUsing.GetLeadingTrivia());
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SolutionTests\SolutionTests.cs (1)
3997var newRoot = root.WithLeadingTrivia(root.GetLeadingTrivia().Add(CS.SyntaxFactory.Whitespace(" ")));
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\CSharpCodeModelService.cs (1)
2851foreach (var trivia in node.GetLeadingTrivia().Reverse())
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
CodeModel\VisualBasicCodeModelService.vb (1)
1283For Each trivia In node.GetLeadingTrivia().Reverse()
System.Text.RegularExpressions.Generator (1)
UpgradeToGeneratedRegexCodeFixer.cs (1)
329=> method.WithLeadingTrivia(nodeToFix.GetLeadingTrivia()).WithTrailingTrivia(nodeToFix.GetTrailingTrivia());
System.Windows.Forms.Analyzers.CodeFixes.CSharp (1)
System\Windows\Forms\CSharp\CodeFixes\AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.cs (1)
128?.GetLeadingTrivia();