22 references to GetFirstDirective
Microsoft.CodeAnalysis.CSharp (1)
CSharpExtensions.cs (1)
382return ((CSharpSyntaxNode)node).GetFirstDirective(predicate);
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (2)
113for (var directive = root.GetFirstDirective(); directive is not null; directive = directive.GetNextDirective()) 196for (var directive = root.GetFirstDirective(); directive is not null; directive = directive.GetNextDirective())
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (2)
113for (var directive = root.GetFirstDirective(); directive is not null; directive = directive.GetNextDirective()) 196for (var directive = root.GetFirstDirective(); directive is not null; directive = directive.GetNextDirective())
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (17)
LexicalAndXml\PreprocessorTests.cs (10)
2103var regionDirective = (RegionDirectiveTriviaSyntax)node.GetFirstDirective(); 2125var regionDirective = (RegionDirectiveTriviaSyntax)node.GetFirstDirective(); 2213var regionDirective = (RegionDirectiveTriviaSyntax)node.GetFirstDirective(); 2234var regionDirective = (RegionDirectiveTriviaSyntax)node.GetFirstDirective(); 2255var regionDirective = (RegionDirectiveTriviaSyntax)node.GetFirstDirective(); 2276var regionDirective = (RegionDirectiveTriviaSyntax)node.GetFirstDirective(); 2297var regionDirective = (RegionDirectiveTriviaSyntax)node.GetFirstDirective(); 2318var regionDirective = (RegionDirectiveTriviaSyntax)node.GetFirstDirective(); 2339var regionDirective = (RegionDirectiveTriviaSyntax)node.GetFirstDirective(); 2360var regionDirective = (RegionDirectiveTriviaSyntax)node.GetFirstDirective();
Syntax\SyntaxNodeTests.cs (7)
1401var d = tree.GetCompilationUnitRoot().GetFirstDirective(); 1430var d1 = tree.GetCompilationUnitRoot().GetFirstDirective(); 1517var d = tree.GetCompilationUnitRoot().GetFirstDirective(); 1548var d = tree.GetCompilationUnitRoot().GetFirstDirective(); 1618var d = tree.GetCompilationUnitRoot().GetFirstDirective(); 1652var d = tree.GetCompilationUnitRoot().GetFirstDirective(); 1739var d = tree.GetCompilationUnitRoot().GetFirstDirective();