224 references to UsingDirective
Microsoft.CodeAnalysis.CSharp (8)
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1091if (node.IsKind(SyntaxKind.UsingDirective) && node.Parent == containingNode)
Compilation\CSharpSemanticModel.cs (2)
93if (!isSpeculative && node.Parent != null && node.Parent.Kind() == SyntaxKind.NameEquals && node.Parent.Parent.Kind() == SyntaxKind.UsingDirective) 5116case SyntaxKind.UsingDirective:
Parser\LanguageParser.cs (1)
951if (this.IsIncrementalAndFactoryContextMatches && this.CurrentNodeKind == SyntaxKind.UsingDirective)
Syntax\SyntaxFacts.cs (1)
250case UsingDirective:
Syntax\SyntaxNormalizer.cs (3)
425else if (currentToken.Parent.IsKind(SyntaxKind.UsingDirective)) 427return nextToken.Parent.IsKind(SyntaxKind.UsingDirective) ? 1 : 2; 686if (token.Parent.Parent?.Kind() is not SyntaxKind.TypeArgumentList and not SyntaxKind.UsingDirective)
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Analyzers\CSharp\Analyzers\MisplacedUsingDirectives\MisplacedUsingDirectivesDiagnosticAnalyzer.cs (1)
95t => t.Kind() is not (SyntaxKind.UsingDirective or SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration));
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\NullableImpactingSpanWalker.cs (2)
73if (node.IsParentKind(SyntaxKind.UsingDirective)) 91if (node.IsParentKind(SyntaxKind.NameEquals) && node.Parent.IsParentKind(SyntaxKind.UsingDirective))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
194case SyntaxKind.UsingDirective:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1232=> node?.Kind() is SyntaxKind.UsingDirective or SyntaxKind.ExternAliasDirective;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
456if (token.Parent is (kind: SyntaxKind.ExternAliasDirective or SyntaxKind.UsingDirective)) 2209token.Parent.IsParentKind(SyntaxKind.UsingDirective))
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Interactive\CSharpSendToInteractiveSubmissionProvider.cs (1)
115|| node.IsKind(SyntaxKind.UsingDirective);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Diagnostics\DiagnosticAnalyzerTests.cs (2)
245context.RegisterSyntaxNodeAction(AnalyzeNode, SyntaxKind.Attribute, SyntaxKind.ClassDeclaration, SyntaxKind.UsingDirective); 263case SyntaxKind.UsingDirective:
Microsoft.CodeAnalysis.CSharp.Features (11)
CodeLens\CSharpCodeLensDisplayInfoService.cs (1)
159case SyntaxKind.UsingDirective:
Completion\KeywordRecommenders\NamespaceKeywordRecommender.cs (1)
117if (token.Parent is (kind: SyntaxKind.ExternAliasDirective or SyntaxKind.UsingDirective) &&
Completion\KeywordRecommenders\UsingKeywordRecommender.cs (2)
123if (token.Parent is (kind: SyntaxKind.ExternAliasDirective or SyntaxKind.UsingDirective)) 152previousToken.Parent is (kind: SyntaxKind.ExternAliasDirective or SyntaxKind.UsingDirective))
EditAndContinue\SyntaxComparer.cs (3)
580case SyntaxKind.UsingDirective: 826case SyntaxKind.UsingDirective: 1418case SyntaxKind.UsingDirective:
MetadataAsSource\FormattingRule.cs (1)
38if (previousToken.Kind() == SyntaxKind.SemicolonToken && previousToken.Parent.Kind() == SyntaxKind.UsingDirective)
src\Analyzers\CSharp\Analyzers\MisplacedUsingDirectives\MisplacedUsingDirectivesDiagnosticAnalyzer.cs (1)
95t => t.Kind() is not (SyntaxKind.UsingDirective or SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration));
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\NullableImpactingSpanWalker.cs (2)
73if (node.IsParentKind(SyntaxKind.UsingDirective)) 91if (node.IsParentKind(SyntaxKind.NameEquals) && node.Parent.IsParentKind(SyntaxKind.UsingDirective))
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
1031var usingDirective = (UsingDirectiveSyntax)tree.FindNodeOrTokenByKind(SyntaxKind.UsingDirective).AsNode();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (180)
Parsing\AnonymousFunctionParsingTests.cs (35)
39N(SyntaxKind.UsingDirective); 140N(SyntaxKind.UsingDirective); 237N(SyntaxKind.UsingDirective); 338N(SyntaxKind.UsingDirective); 439N(SyntaxKind.UsingDirective); 543N(SyntaxKind.UsingDirective); 649N(SyntaxKind.UsingDirective); 658N(SyntaxKind.UsingDirective); 792N(SyntaxKind.UsingDirective); 2458N(SyntaxKind.UsingDirective); 2467N(SyntaxKind.UsingDirective); 2606N(SyntaxKind.UsingDirective); 2615N(SyntaxKind.UsingDirective); 2754N(SyntaxKind.UsingDirective); 2763N(SyntaxKind.UsingDirective); 2905N(SyntaxKind.UsingDirective); 3016N(SyntaxKind.UsingDirective); 3025N(SyntaxKind.UsingDirective); 3164N(SyntaxKind.UsingDirective); 3279N(SyntaxKind.UsingDirective); 3288N(SyntaxKind.UsingDirective); 3432N(SyntaxKind.UsingDirective); 3441N(SyntaxKind.UsingDirective); 3585N(SyntaxKind.UsingDirective); 3594N(SyntaxKind.UsingDirective); 3742N(SyntaxKind.UsingDirective); 3862N(SyntaxKind.UsingDirective); 3871N(SyntaxKind.UsingDirective); 4019N(SyntaxKind.UsingDirective); 4143N(SyntaxKind.UsingDirective); 4152N(SyntaxKind.UsingDirective); 4305N(SyntaxKind.UsingDirective); 4314N(SyntaxKind.UsingDirective); 4467N(SyntaxKind.UsingDirective); 4476N(SyntaxKind.UsingDirective);
Parsing\CollectionExpressionParsingTests.cs (6)
7961N(SyntaxKind.UsingDirective); 8106N(SyntaxKind.UsingDirective); 8259N(SyntaxKind.UsingDirective); 8415N(SyntaxKind.UsingDirective); 8559N(SyntaxKind.UsingDirective); 8714N(SyntaxKind.UsingDirective);
Parsing\FunctionPointerTests.cs (1)
4133N(SyntaxKind.UsingDirective);
Parsing\ScriptParsingTests.cs (3)
1115N(SyntaxKind.UsingDirective); 1124N(SyntaxKind.UsingDirective); 1141N(SyntaxKind.UsingDirective);
Parsing\SingleLineDeclarationParsingTests.cs (2)
503N(SyntaxKind.UsingDirective); 543N(SyntaxKind.UsingDirective);
Parsing\StatementAttributeParsingTests.cs (1)
5623N(SyntaxKind.UsingDirective);
Parsing\TopLevelStatementsParsingTests.cs (20)
342N(SyntaxKind.UsingDirective); 572N(SyntaxKind.UsingDirective); 1628N(SyntaxKind.UsingDirective); 1807N(SyntaxKind.UsingDirective); 2097N(SyntaxKind.UsingDirective); 2121N(SyntaxKind.UsingDirective); 2144N(SyntaxKind.UsingDirective); 2175N(SyntaxKind.UsingDirective); 2206N(SyntaxKind.UsingDirective); 2677N(SyntaxKind.UsingDirective); 2923N(SyntaxKind.UsingDirective); 2965N(SyntaxKind.UsingDirective); 2974N(SyntaxKind.UsingDirective); 3020N(SyntaxKind.UsingDirective); 3296N(SyntaxKind.UsingDirective); 3306N(SyntaxKind.UsingDirective); 3338N(SyntaxKind.UsingDirective); 3347N(SyntaxKind.UsingDirective); 3381N(SyntaxKind.UsingDirective); 3449N(SyntaxKind.UsingDirective);
Parsing\UsingDirectiveParsingTests.cs (86)
35N(SyntaxKind.UsingDirective); 315N(SyntaxKind.UsingDirective); 366N(SyntaxKind.UsingDirective); 555N(SyntaxKind.UsingDirective); 618N(SyntaxKind.UsingDirective); 669N(SyntaxKind.UsingDirective); 722N(SyntaxKind.UsingDirective); 781N(SyntaxKind.UsingDirective); 841N(SyntaxKind.UsingDirective); 874N(SyntaxKind.UsingDirective); 911N(SyntaxKind.UsingDirective); 948N(SyntaxKind.UsingDirective); 988N(SyntaxKind.UsingDirective); 1032N(SyntaxKind.UsingDirective); 1077N(SyntaxKind.UsingDirective); 1118N(SyntaxKind.UsingDirective); 1166N(SyntaxKind.UsingDirective); 1196N(SyntaxKind.UsingDirective); 1238N(SyntaxKind.UsingDirective); 1268N(SyntaxKind.UsingDirective); 1314N(SyntaxKind.UsingDirective); 1343N(SyntaxKind.UsingDirective); 1389N(SyntaxKind.UsingDirective); 1419N(SyntaxKind.UsingDirective); 1473N(SyntaxKind.UsingDirective); 1503N(SyntaxKind.UsingDirective); 1555N(SyntaxKind.UsingDirective); 1612N(SyntaxKind.UsingDirective); 1718N(SyntaxKind.UsingDirective); 1817N(SyntaxKind.UsingDirective); 1864N(SyntaxKind.UsingDirective); 1908N(SyntaxKind.UsingDirective); 1958N(SyntaxKind.UsingDirective); 1983N(SyntaxKind.UsingDirective); 2033N(SyntaxKind.UsingDirective); 2058N(SyntaxKind.UsingDirective); 2103N(SyntaxKind.UsingDirective); 2177N(SyntaxKind.UsingDirective); 2255N(SyntaxKind.UsingDirective); 2336N(SyntaxKind.UsingDirective); 2412N(SyntaxKind.UsingDirective); 2483N(SyntaxKind.UsingDirective); 2558N(SyntaxKind.UsingDirective); 2590N(SyntaxKind.UsingDirective); 2687N(SyntaxKind.UsingDirective); 2832N(SyntaxKind.UsingDirective); 2962N(SyntaxKind.UsingDirective); 3060N(SyntaxKind.UsingDirective); 3160N(SyntaxKind.UsingDirective); 3181N(SyntaxKind.UsingDirective); 3224N(SyntaxKind.UsingDirective); 3245N(SyntaxKind.UsingDirective); 3288N(SyntaxKind.UsingDirective); 3309N(SyntaxKind.UsingDirective); 3358N(SyntaxKind.UsingDirective); 3387N(SyntaxKind.UsingDirective); 3427N(SyntaxKind.UsingDirective); 3476N(SyntaxKind.UsingDirective); 3529N(SyntaxKind.UsingDirective); 3576N(SyntaxKind.UsingDirective); 3652N(SyntaxKind.UsingDirective); 3661N(SyntaxKind.UsingDirective); 3802N(SyntaxKind.UsingDirective); 3811N(SyntaxKind.UsingDirective); 3964N(SyntaxKind.UsingDirective); 4009N(SyntaxKind.UsingDirective); 4057N(SyntaxKind.UsingDirective); 4104N(SyntaxKind.UsingDirective); 4151N(SyntaxKind.UsingDirective); 4195N(SyntaxKind.UsingDirective); 4248N(SyntaxKind.UsingDirective); 4306N(SyntaxKind.UsingDirective); 4364N(SyntaxKind.UsingDirective); 4419N(SyntaxKind.UsingDirective); 4470N(SyntaxKind.UsingDirective); 4510N(SyntaxKind.UsingDirective); 4550N(SyntaxKind.UsingDirective); 4587N(SyntaxKind.UsingDirective); 4630N(SyntaxKind.UsingDirective); 4711N(SyntaxKind.UsingDirective); 4792N(SyntaxKind.UsingDirective); 4870N(SyntaxKind.UsingDirective); 4949N(SyntaxKind.UsingDirective); 5027N(SyntaxKind.UsingDirective); 5107N(SyntaxKind.UsingDirective); 5187N(SyntaxKind.UsingDirective);
Syntax\SyntaxTreeTests.cs (26)
344N(SyntaxKind.UsingDirective); 379N(SyntaxKind.UsingDirective); 411N(SyntaxKind.UsingDirective); 459N(SyntaxKind.UsingDirective); 485N(SyntaxKind.UsingDirective); 521N(SyntaxKind.UsingDirective); 554N(SyntaxKind.UsingDirective); 603N(SyntaxKind.UsingDirective); 630N(SyntaxKind.UsingDirective); 676N(SyntaxKind.UsingDirective); 716N(SyntaxKind.UsingDirective); 775N(SyntaxKind.UsingDirective); 847N(SyntaxKind.UsingDirective); 918N(SyntaxKind.UsingDirective); 956N(SyntaxKind.UsingDirective); 983N(SyntaxKind.UsingDirective); 1011N(SyntaxKind.UsingDirective); 1020N(SyntaxKind.UsingDirective); 1047N(SyntaxKind.UsingDirective); 1057N(SyntaxKind.UsingDirective); 1125N(SyntaxKind.UsingDirective); 1135N(SyntaxKind.UsingDirective); 1181N(SyntaxKind.UsingDirective); 1199N(SyntaxKind.UsingDirective); 1253N(SyntaxKind.UsingDirective); 1264N(SyntaxKind.UsingDirective);
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Simplification\Simplifiers\NameSimplifier.cs (1)
654expression.IsParentKind(SyntaxKind.UsingDirective) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
194case SyntaxKind.UsingDirective:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1232=> node?.Kind() is SyntaxKind.UsingDirective or SyntaxKind.ExternAliasDirective;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
456if (token.Parent is (kind: SyntaxKind.ExternAliasDirective or SyntaxKind.UsingDirective)) 2209token.Parent.IsParentKind(SyntaxKind.UsingDirective))
Microsoft.ML.InternalCodeAnalyzer (1)
BestFriendAnalyzer.cs (1)
66foreach (var node in model.SyntaxTree.GetRoot().DescendantNodes(n => !n.IsKind(SyntaxKind.UsingDirective)))
Microsoft.VisualStudio.LanguageServices.CSharp (8)
CodeModel\CSharpCodeModelService.cs (5)
247case SyntaxKind.UsingDirective: 531case SyntaxKind.UsingDirective: 849case SyntaxKind.UsingDirective: 956if (node.Kind() == SyntaxKind.UsingDirective) 3512case SyntaxKind.UsingDirective:
CodeModel\CSharpCodeModelService.NodeLocator.cs (2)
70case SyntaxKind.UsingDirective: 121case SyntaxKind.UsingDirective:
LanguageService\CSharpHelpContextService.cs (1)
275else if (token.Parent.Parent.IsKind(SyntaxKind.UsingDirective))