81 references to HasLeadingTrivia
Microsoft.CodeAnalysis (2)
SourceGeneration\GeneratedCodeUtilities.cs (2)
90if (root.HasLeadingTrivia) 121if (root.HasLeadingTrivia)
Microsoft.CodeAnalysis.CodeStyle (3)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
90if (root.HasLeadingTrivia) 121if (root.HasLeadingTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
108if (node.HasLeadingTrivia)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
309if (!designation.HasLeadingTrivia)
Microsoft.CodeAnalysis.CSharp.Features (5)
ChangeSignature\CSharpChangeSignatureService.cs (1)
771if (!node.HasLeadingTrivia)
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (1)
123if (isFirst && !newRoot.HasLeadingTrivia)
Copilot\CSharpCopilotCodeFixProvider.cs (1)
129.WithLeadingTrivia(memberDeclaration.HasLeadingTrivia ? memberDeclaration.GetLeadingTrivia() : method.GetLeadingTrivia())
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
496if (typeSyntax.HasLeadingTrivia)
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
309if (!designation.HasLeadingTrivia)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (58)
LexicalAndXml\XmlDocCommentTests.cs (53)
157Assert.True(doc.Content[0].HasLeadingTrivia); 178Assert.True(doc.Content[0].HasLeadingTrivia); 203Assert.True(doc.Content[0].HasLeadingTrivia); 225Assert.True(doc.Content[0].HasLeadingTrivia); 248Assert.True(doc.Content[0].HasLeadingTrivia); 271Assert.True(doc.Content[0].HasLeadingTrivia); 298Assert.True(doc.Content[0].HasLeadingTrivia); 326Assert.True(doc.Content[0].HasLeadingTrivia); 350Assert.True(doc.Content[0].HasLeadingTrivia); 375Assert.True(doc.Content[0].HasLeadingTrivia); 401Assert.True(doc.Content[0].HasLeadingTrivia); 428Assert.True(doc.Content[0].HasLeadingTrivia); 455Assert.True(doc.Content[0].HasLeadingTrivia); 483Assert.True(doc.Content[0].HasLeadingTrivia); 512Assert.True(doc.Content[0].HasLeadingTrivia); 542Assert.True(doc.Content[0].HasLeadingTrivia); 571Assert.True(doc.Content[0].HasLeadingTrivia); 601Assert.True(doc.Content[0].HasLeadingTrivia); 632Assert.True(doc.Content[0].HasLeadingTrivia); 655Assert.True(doc.Content[0].HasLeadingTrivia); 677Assert.True(doc.Content[0].HasLeadingTrivia); 699Assert.True(doc.Content[0].HasLeadingTrivia); 721Assert.True(doc.Content[0].HasLeadingTrivia); 763Assert.True(doc.Content[0].HasLeadingTrivia); 797Assert.True(doc.Content[0].HasLeadingTrivia); 830Assert.True(doc.Content[0].HasLeadingTrivia); 861Assert.True(doc.Content[0].HasLeadingTrivia); 889Assert.True(doc.Content[0].HasLeadingTrivia); 914Assert.True(doc.Content[0].HasLeadingTrivia); 940Assert.True(doc.Content[0].HasLeadingTrivia); 965Assert.True(doc.Content[0].HasLeadingTrivia); 992Assert.True(doc.Content[0].HasLeadingTrivia); 1023Assert.True(doc.Content[0].HasLeadingTrivia); 1051Assert.True(doc.Content[0].HasLeadingTrivia); 1076Assert.True(doc.Content[0].HasLeadingTrivia); 1101Assert.True(doc.Content[0].HasLeadingTrivia); 1128Assert.True(doc.Content[0].HasLeadingTrivia); 1161Assert.True(doc.Content[0].HasLeadingTrivia); 1192Assert.True(doc.Content[0].HasLeadingTrivia); 1218Assert.True(doc.Content[0].HasLeadingTrivia); 1245Assert.True(doc.Content[0].HasLeadingTrivia); 1273Assert.True(doc.Content[0].HasLeadingTrivia); 1293Assert.True(classdecl.HasLeadingTrivia); 1318Assert.True(doc.Content[0].HasLeadingTrivia); 1342Assert.True(doc.Content[0].HasLeadingTrivia); 1367Assert.True(doc.Content[0].HasLeadingTrivia); 1391Assert.True(doc.Content[0].HasLeadingTrivia); 1416Assert.True(doc.Content[0].HasLeadingTrivia); 1440Assert.True(doc.Content[0].HasLeadingTrivia); 1465Assert.True(doc.Content[0].HasLeadingTrivia); 1489Assert.True(doc.Content[0].HasLeadingTrivia); 1569Assert.True(doc.Content[0].HasLeadingTrivia); 1597Assert.True(doc.Content[0].HasLeadingTrivia);
Syntax\SyntaxNodeTests.cs (5)
3494Assert.True(node.HasLeadingTrivia); 3505Assert.True(node.HasLeadingTrivia); 3739Assert.True(namedNode.HasLeadingTrivia); 3748Assert.False(namedNode.HasLeadingTrivia); 3755Assert.True(namedNode.HasLeadingTrivia);
Microsoft.CodeAnalysis.Features (1)
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeNamespaceScopeEditor.cs (1)
96if (leading && syntaxNode.HasLeadingTrivia)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicConvertToIteratorCodeFixProvider.vb (1)
118If methodStatementNode.Modifiers.IsEmpty() AndAlso methodStatementNode.HasLeadingTrivia Then
Microsoft.CodeAnalysis.VisualBasic.Features (4)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
612If Not node.HasLeadingTrivia Then
CodeFixes\Suppression\VisualBasicSuppressionCodeFixProvider.vb (1)
143Dim leadingTrivia = If(isFirst AndAlso Not compilationRoot.HasLeadingTrivia,
ExtractMethod\Extensions.vb (1)
415If i = 0 AndAlso Not leadingTriviaApplied AndAlso declarationStatement.HasLeadingTrivia Then
src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicConvertToIteratorCodeFixProvider.vb (1)
118If methodStatementNode.Modifiers.IsEmpty() AndAlso methodStatementNode.HasLeadingTrivia Then
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (2)
Syntax\ManualTests.vb (2)
106Assert.True(node.HasLeadingTrivia) 116Assert.True(node.HasLeadingTrivia)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeCleanup\Providers\AddMissingTokensCodeCleanupProvider.vb (1)
264If n.ParameterList.HasLeadingTrivia Then
Microsoft.CodeAnalysis.Workspaces (3)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
90if (root.HasLeadingTrivia) 121if (root.HasLeadingTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
108if (node.HasLeadingTrivia)