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