38 references to ContainsDirectives
Microsoft.CodeAnalysis (3)
Syntax\SyntaxNode.cs (1)
453if (!this.ContainsDirectives)
Syntax\SyntaxNodeOrToken.cs (2)
494return _nodeOrParent.ContainsDirectives; 871foreach (var trivia in node.DescendantTrivia(node => node.ContainsDirectives, descendIntoTrivia: true))
Microsoft.CodeAnalysis.CodeStyle (2)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
241foreach (var trivia in root.DescendantTrivia(node => node.ContainsDirectives))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
867foreach (var token in root.DescendantTokens(descendIntoChildren: static node => node.ContainsDirectives))
Microsoft.CodeAnalysis.CSharp (5)
Syntax\CompilationUnitSyntax.cs (3)
23if (!this.ContainsDirectives) 36if (!this.ContainsDirectives) 54if (this.ContainsDirectives)
Syntax\SyntaxNodeRemover.cs (2)
423if (node.ContainsDirectives) 434var directivesInSpan = node.DescendantTrivia(span, n => n.ContainsDirectives, descendIntoTrivia: true)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
392if (body?.ContainsDirectives is true)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
278if (!node.ContainsDirectives)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
41if (switchStatement.ContainsDirectives)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
46if (switchStatement.ContainsDirectives)
Microsoft.CodeAnalysis.CSharp.Features (6)
ConvertLinq\ConvertForEachToLinqQuery\AbstractToMethodConverter.cs (1)
110!returnStatement.ContainsDirectives &&
ConvertLinq\ConvertForEachToLinqQuery\CSharpConvertForEachToLinqQueryProvider.cs (1)
318!lastNonLocalFunctionStatement.ContainsDirectives &&
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
73_source.ContainsDirectives))
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
392if (body?.ContainsDirectives is true)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
41if (switchStatement.ContainsDirectives)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
46if (switchStatement.ContainsDirectives)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (6)
Parsing\ScriptParsingTests.cs (3)
9641Assert.True(root.ContainsDirectives); 9655Assert.True(root.ContainsDirectives); 9667Assert.True(root.ContainsDirectives);
Syntax\SyntaxNodeTests.cs (3)
337var descendantDirectives = expr.DescendantNodesAndSelf(n => n.ContainsDirectives, descendIntoTrivia: true).OfType<DirectiveTriviaSyntax>().ToList(); 471Assert.True(compilationUnit.ContainsDirectives); 505Assert.False(compilationUnit.ContainsDirectives);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
278if (!node.ContainsDirectives)
Microsoft.CodeAnalysis.Features (2)
ConvertLinq\ConvertForEachToLinqQuery\AbstractConvertForEachToLinqQueryProvider.cs (1)
81if (forEachStatement.ContainsDirectives)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
241foreach (var trivia in root.DescendantTrivia(node => node.ContainsDirectives))
Microsoft.CodeAnalysis.VisualBasic (2)
Syntax\SyntaxNodeRemover.vb (2)
299If node.ContainsDirectives Then 306Dim directivesInSpan = node.DescendantTrivia(span, Function(n) n.ContainsDirectives, descendIntoTrivia:=True) _
Microsoft.CodeAnalysis.VisualBasic.Features (1)
Completion\KeywordRecommenders\PreprocessorDirectives\PreprocessorHelpers.vb (1)
34If Not node.ContainsDirectives Then
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
TestSyntaxNodes.vb (1)
2119Assert.True(compilationUnit.ContainsDirectives)
Microsoft.CodeAnalysis.Workspaces (4)
FindSymbols\Shared\AbstractSyntaxIndex.cs (1)
140var checksum = root.ContainsDirectives && ContainsIfDirective(root, ifDirectiveKind) ? textAndDirectivesChecksum : textChecksum;
FindSymbols\SyntaxTree\SyntaxTreeIndex_Create.cs (1)
76var containsDirective = root.ContainsDirectives;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
867foreach (var token in root.DescendantTokens(descendIntoChildren: static node => node.ContainsDirectives))
Workspace\Solution\DocumentState_LinkedFileReuse.cs (1)
207if (!siblingRoot.ContainsDirectives)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SolutionTests\SolutionTests.cs (1)
3805Assert.True(newRoot.ContainsDirectives);