56 references to NamespaceOrType
Microsoft.CodeAnalysis.CSharp (36)
_generated\0\Syntax.xml.Main.Generated.cs (1)
1975=> node.Update(VisitToken(node.GlobalKeyword), VisitToken(node.UsingKeyword), VisitToken(node.StaticKeyword), VisitToken(node.UnsafeKeyword), (NameEqualsSyntax?)Visit(node.Alias), (TypeSyntax?)Visit(node.NamespaceOrType) ?? throw new ArgumentNullException("namespaceOrType"), VisitToken(node.SemicolonToken));
_generated\2\Syntax.xml.Syntax.Generated.cs (7)
9488if (globalKeyword != this.GlobalKeyword || usingKeyword != this.UsingKeyword || staticKeyword != this.StaticKeyword || unsafeKeyword != this.UnsafeKeyword || alias != this.Alias || namespaceOrType != this.NamespaceOrType || semicolonToken != this.SemicolonToken) 9498public UsingDirectiveSyntax WithGlobalKeyword(SyntaxToken globalKeyword) => Update(globalKeyword, this.UsingKeyword, this.StaticKeyword, this.UnsafeKeyword, this.Alias, this.NamespaceOrType, this.SemicolonToken); 9499public UsingDirectiveSyntax WithUsingKeyword(SyntaxToken usingKeyword) => Update(this.GlobalKeyword, usingKeyword, this.StaticKeyword, this.UnsafeKeyword, this.Alias, this.NamespaceOrType, this.SemicolonToken); 9500public UsingDirectiveSyntax WithStaticKeyword(SyntaxToken staticKeyword) => Update(this.GlobalKeyword, this.UsingKeyword, staticKeyword, this.UnsafeKeyword, this.Alias, this.NamespaceOrType, this.SemicolonToken); 9501public UsingDirectiveSyntax WithUnsafeKeyword(SyntaxToken unsafeKeyword) => Update(this.GlobalKeyword, this.UsingKeyword, this.StaticKeyword, unsafeKeyword, this.Alias, this.NamespaceOrType, this.SemicolonToken); 9502public UsingDirectiveSyntax WithAlias(NameEqualsSyntax? alias) => Update(this.GlobalKeyword, this.UsingKeyword, this.StaticKeyword, this.UnsafeKeyword, alias, this.NamespaceOrType, this.SemicolonToken); 9504public UsingDirectiveSyntax WithSemicolonToken(SyntaxToken semicolonToken) => Update(this.GlobalKeyword, this.UsingKeyword, this.StaticKeyword, this.UnsafeKeyword, this.Alias, this.NamespaceOrType, semicolonToken);
Binder\Binder_Symbols.cs (1)
1017if (usingDirective.Alias != null && usingDirective.NamespaceOrType == node)
Symbols\AliasSymbol.cs (7)
381else if (usingDirective.NamespaceOrType is not NameSyntax) 383MessageID.IDS_FeatureUsingTypeAlias.CheckFeatureAvailability(diagnostics, usingDirective.NamespaceOrType); 386var syntax = usingDirective.NamespaceOrType; 410if (usingDirective.NamespaceOrType is NullableTypeSyntax nullableType && 419(usingDirective.NamespaceOrType.IsNint || usingDirective.NamespaceOrType.IsNuint)) 422MessageID.IDS_FeatureUsingTypeAlias.CheckFeatureAvailability(diagnostics, usingDirective.NamespaceOrType);
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (18)
334diagnostics.Add(ErrorCode.HDN_DuplicateWithGlobalUsing, namespaceOrType.UsingDirective!.NamespaceOrType.Location, namespaceOrType.NamespaceOrType); 686if (!usingDirective.NamespaceOrType.IsMissing) 730if (usingDirective.NamespaceOrType.IsMissing) 766declarationBinderSafe ??= compilation.GetBinderFactory(declarationSyntax.SyntaxTree).GetBinder(usingDirective.NamespaceOrType).WithAdditionalFlags(BinderFlags.SuppressConstraintChecks); 779var imported = declarationBinder.BindNamespaceOrTypeSymbol(usingDirective.NamespaceOrType, directiveDiagnostics, basesBeingResolved).NamespaceOrTypeSymbol; 788diagnostics.Add(ErrorCode.ERR_BadUsingType, usingDirective.NamespaceOrType.Location, imported); 795usingDirective.NamespaceOrType.Location, imported); 806diagnostics.Add(ErrorCode.ERR_BadUsingNamespace, usingDirective.NamespaceOrType.Location, imported); 813diagnostics.Add(ErrorCode.ERR_GlobalUsingStaticFileType, usingDirective.NamespaceOrType.Location, imported); 821usingDirective.NamespaceOrType.Location, importedType); 825declarationBinder.ReportDiagnosticsIfObsolete(diagnostics, importedType, usingDirective.NamespaceOrType, hasBaseReceiver: false); 834diagnostics.Add(ErrorCode.ERR_BadUsingStaticType, usingDirective.NamespaceOrType.Location, imported.GetKindText()); 846diagnostics.Add(ErrorCode.ERR_BadSKknown, usingDirective.NamespaceOrType.Location, 847usingDirective.NamespaceOrType, 1012compilation.GetBinder(alias.UsingDirective.NamespaceOrType).ReportDiagnosticsIfUnsafeMemberAccess(diagnostics.DiagnosticBag, alias.Alias.Target, alias.Alias.GetFirstLocation()); 1041var location = usingDirective.NamespaceOrType.Location; 1046compilation.GetBinder(usingDirective.NamespaceOrType).ReportDiagnosticsIfUnsafeMemberAccess(diagnostics, typeSymbol, usingDirective.NamespaceOrType);
Syntax\SyntaxFacts.cs (1)
251return ((UsingDirectiveSyntax)parent).NamespaceOrType == node;
Syntax\UsingDirectiveSyntax.cs (1)
19public NameSyntax? Name => this.NamespaceOrType as NameSyntax;
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
170Contract.ThrowIfNull(@using.NamespaceOrType); 171var symbolInfo = semanticModel.GetSymbolInfo(@using.NamespaceOrType);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
205usingDirective.NamespaceOrType == node; 215name = usingDirective.NamespaceOrType;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\roslyn\src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
189var newType = await Simplifier.ExpandAsync(usingDirective.NamespaceOrType, document, cancellationToken: cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Features (4)
EditAndContinue\SyntaxComparer.cs (3)
842ComputeDistance(leftUsing.NamespaceOrType, rightUsing.NamespaceOrType); 1428return ((UsingDirectiveSyntax)node).NamespaceOrType;
src\roslyn\src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
189var newType = await Simplifier.ExpandAsync(usingDirective.NamespaceOrType, document, cancellationToken: cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
Classification\SyntaxClassification\UsingDirectiveSyntaxClassifier.cs (1)
46var symbolInfo = semanticModel.GetSymbolInfo(usingDirective.NamespaceOrType, cancellationToken);
CodeGeneration\CSharpSyntaxGenerator.cs (1)
2086UsingDirectiveSyntax usingDeclaration => ReplaceWithTrivia(declaration, usingDeclaration.NamespaceOrType, this.DottedName(name)),
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (1)
623TryGetSimpleTypeName(usingDirectiveNode.NamespaceOrType, typeParameterNames: null, out var name, out _))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
170Contract.ThrowIfNull(@using.NamespaceOrType); 171var symbolInfo = semanticModel.GetSymbolInfo(@using.NamespaceOrType);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
205usingDirective.NamespaceOrType == node; 215name = usingDirective.NamespaceOrType;
Roslyn.Diagnostics.CSharp.Analyzers (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
170Contract.ThrowIfNull(@using.NamespaceOrType); 171var symbolInfo = semanticModel.GetSymbolInfo(@using.NamespaceOrType);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
205usingDirective.NamespaceOrType == node; 215name = usingDirective.NamespaceOrType;