2 implementations of IsGlobalNamespace
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\NamespaceSymbol.cs (1)
27bool INamespaceSymbol.IsGlobalNamespace => _underlying.IsGlobalNamespace;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\NamespaceSymbol.vb (1)
60Public Overridable ReadOnly Property IsGlobalNamespace As Boolean Implements INamespaceSymbol.IsGlobalNamespace, INamespaceSymbolInternal.IsGlobalNamespace
189 references to IsGlobalNamespace
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Parser\Extensions.cs (1)
125string? @namespace = type.ContainingNamespace is { IsGlobalNamespace: false } containingNamespace ? containingNamespace.ToDisplayString() : null;
Microsoft.AspNetCore.App.Analyzers (6)
Http\HeaderDictionaryAddAnalyzer.cs (1)
63IsGlobalNamespace: true
Http\HeaderDictionaryIndexerAnalyzer.cs (1)
66IsGlobalNamespace: true
Kestrel\ListenOnIPv6AnyAnalyzer.cs (2)
104ContainingNamespace: { Name: "Net", ContainingNamespace: { Name: "System", ContainingNamespace.IsGlobalNamespace: true } } 131ContainingNamespace.IsGlobalNamespace: true
RouteEmbeddedLanguage\Infrastructure\RouteStringSyntaxDetector.cs (1)
348ContainingNamespace.IsGlobalNamespace: true,
RouteHandlers\DetectMisplacedLambdaAttribute.cs (1)
57if (@namespace != null && !@namespace.IsGlobalNamespace)
Microsoft.AspNetCore.Components.Analyzers (1)
ComponentInternalUsageDiagnosticAnalzyer.cs (1)
52return @namespace.IsGlobalNamespace;
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
ComponentInternalUsageDiagnosticAnalzyer.cs (1)
52return @namespace.IsGlobalNamespace;
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\InvocationOperationExtensions.cs (1)
30targetOperation.TargetMethod.ContainingNamespace is { Name: "Builder", ContainingNamespace: { Name: "AspNetCore", ContainingNamespace: { Name: "Microsoft", ContainingNamespace.IsGlobalNamespace: true } } } &&
Microsoft.CodeAnalysis (5)
DiagnosticAnalyzer\AnalysisScope.cs (1)
223!((symbol.Kind == SymbolKind.Namespace && ((INamespaceSymbol)symbol).IsGlobalNamespace));
DocumentationCommentId.cs (2)
507if (symbol.IsGlobalNamespace) 574if (symbol.IsGlobalNamespace)
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (1)
201((INamespaceSymbol)containingSymbol.ContainingSymbol).IsGlobalNamespace)
Symbols\ISymbolExtensions.cs (1)
136ContainingNamespace.IsGlobalNamespace: true,
Microsoft.CodeAnalysis.CodeStyle (12)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
681ContainingNamespace.IsGlobalNamespace: true,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamespaceOrTypeSymbolExtensions.cs (1)
76if (namespaceOrTypeSymbol == null || (namespaceOrTypeSymbol.IsNamespace && ((INamespaceSymbol)namespaceOrTypeSymbol).IsGlobalNamespace))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (4)
238b.ContainingNamespace.ContainingNamespace.IsGlobalNamespace) 252&& symbol.ContainingNamespace.ContainingNamespace?.IsGlobalNamespace == true; 751ContainingNamespace: { Name: nameof(System), ContainingNamespace.IsGlobalNamespace: true } 759ContainingNamespace: { Name: nameof(System), ContainingNamespace.IsGlobalNamespace: true }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamespaceSymbolKey.cs (1)
37Debug.Assert(symbol.IsGlobalNamespace);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (3)
549if (x.IsGlobalNamespace != y.IsGlobalNamespace || 555if (x.IsGlobalNamespace && symbolEquivalenceComparer._assemblyComparer == null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (2)
211if (x.IsGlobalNamespace && _symbolEquivalenceComparer._assemblyComparer == null) 218Hash.Combine(x.IsGlobalNamespace,
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
52((INamespaceSymbol)containingSymbol.ContainingSymbol).IsGlobalNamespace)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
411ContainingNamespace.IsGlobalNamespace: true,
Microsoft.CodeAnalysis.CSharp (9)
Compilation\SyntaxTreeSemanticModel.cs (1)
2413Debug.Assert(((INamespaceSymbol)declaredSymbol).IsGlobalNamespace);
SymbolDisplay\SymbolDisplayVisitor.cs (3)
190AddPunctuation(containingNamespace.IsGlobalNamespace ? SyntaxKind.ColonColonToken : SyntaxKind.DotToken); 194if (symbol.IsGlobalNamespace) 438!namespaceSymbol.IsGlobalNamespace ||
SymbolDisplay\SymbolDisplayVisitor.Types.cs (2)
279var shouldSkip = namespaceSymbol.IsGlobalNamespace && symbol.TypeKind == TypeKind.Error; 284AddPunctuation(namespaceSymbol.IsGlobalNamespace ? SyntaxKind.ColonColonToken : SyntaxKind.DotToken);
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (2)
63Debug.Assert(symbol.ContainingNamespace != null || symbol.IsGlobalNamespace); 68if (symbol.IsGlobalNamespace)
Symbols\ModuleSymbol.cs (1)
352if (namespaceSymbol.IsGlobalNamespace || (object)namespaceSymbol.ContainingNamespace == null)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.ExpressionSyntaxGeneratorVisitor.cs (2)
65if (symbol.ContainingNamespace.IsGlobalNamespace) 93if (symbol.ContainingNamespace.IsGlobalNamespace)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
292if (symbol.ContainingNamespace.IsGlobalNamespace) 326if (symbol.ContainingNamespace.IsGlobalNamespace)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenTupleTest.cs (4)
6226Assert.False(ns.IsGlobalNamespace); 6234Assert.False(ns.IsGlobalNamespace); 6242Assert.False(ns.IsGlobalNamespace); 6253Assert.False(ns.IsGlobalNamespace);
Microsoft.CodeAnalysis.CSharp.Features (3)
DecompiledSource\CSharpDecompiledSourceService.cs (1)
113symbol is not null and not INamespaceSymbol { IsGlobalNamespace: true };
ExtractInterface\CSharpExtractInterfaceService.cs (1)
52return typeSymbol.ContainingNamespace.IsGlobalNamespace
UseNamedArguments\CSharpUseNamedArgumentsCodeRefactoringProvider.cs (1)
46if (argType?.ContainingNamespace is { Name: nameof(System), ContainingNamespace.IsGlobalNamespace: true } &&
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
1306if (!context.Symbol.ContainingNamespace.IsGlobalNamespace)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
InteractiveSessionTests.cs (1)
1192Assert.True(import.NamespaceOrType is INamespaceSymbol { Name: "System", ContainingNamespace.IsGlobalNamespace: true });
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\TopLevelStatementsTests.cs (4)
711Assert.True(((INamespaceSymbol)local.ContainingSymbol.ContainingSymbol.ContainingSymbol).IsGlobalNamespace); 4227Assert.True(((INamespaceSymbol)local.ContainingSymbol.ContainingSymbol.ContainingSymbol).IsGlobalNamespace); 4905Assert.True(((INamespaceSymbol)label.ContainingSymbol.ContainingSymbol.ContainingSymbol).IsGlobalNamespace); 4990Assert.True(((INamespaceSymbol)label.ContainingSymbol.ContainingSymbol.ContainingSymbol).IsGlobalNamespace);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (42)
Compilation\GetImportScopesTests.cs (36)
55Assert.True(scopes.Single().Imports.Single().NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) }); 71Assert.True(scopes.Single().Imports.Single().NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) }); 102Assert.True(scopes.Single().Imports.Single().NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) }); 130Assert.True(scopes.Single().Imports.Single().NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) }); 147Assert.True(scopes.Single().Imports.Any(i => i.NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) })); 148Assert.True(scopes.Single().Imports.Any(i => i.NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(Microsoft) })); 175Assert.True(scopes.Single().Imports.Single().NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) }); 198Assert.True(scopes[0].Imports.Single().NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(Microsoft) }); 200Assert.True(scopes[1].Imports.Single().NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) }); 226Assert.True(scopes[0].Imports.Single().NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(Microsoft) }); 228Assert.True(scopes[1].Imports.Single().NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) }); 244Assert.True(scopes.Single().Aliases.Single() is { Name: "S", Target: INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) } }); 260Assert.True(scopes.Single().Aliases.Single() is { Name: "S", Target: { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) } }); 291Assert.True(scopes.Single().Aliases.Single() is { Name: "S", Target: INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) } }); 319Assert.True(scopes.Single().Aliases.Single() is { Name: "S", Target: { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) } }); 336Assert.True(scopes.Single().Aliases.Any(a => a is { Name: "S", Target: INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) } })); 337Assert.True(scopes.Single().Aliases.Any(a => a is { Name: "M", Target: INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(Microsoft) } })); 364Assert.True(scopes.Single().Aliases.Single() is { Name: "S", Target: INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) } }); 387Assert.True(scopes[0].Aliases.Single() is { Name: "M", Target: INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(Microsoft) } }); 389Assert.True(scopes[1].Aliases.Single() is { Name: "S", Target: INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) } }); 437Assert.True(scopes.Single().ExternAliases.Single() is { Name: "CORE", Target: INamespaceSymbol { IsGlobalNamespace: true } }); 459Assert.True(scopes.Single().ExternAliases.Single() is { Name: "CORE", Target: INamespaceSymbol { IsGlobalNamespace: true } }); 480Assert.True(scopes.Single().ExternAliases.Single() is { Name: "CORE", Target: INamespaceSymbol { IsGlobalNamespace: true } }); 499Assert.True(scopes.Single().ExternAliases.Single() is { Name: "CORE", Target: INamespaceSymbol { IsGlobalNamespace: true } }); 516Assert.True(scopes.Single().ExternAliases.Single() is { Name: "CORE", Target: INamespaceSymbol { IsGlobalNamespace: true } }); 536Assert.True(scopes.Single().ExternAliases.Any(a => a is { Name: "CORE1", Target: INamespaceSymbol { IsGlobalNamespace: true } })); 537Assert.True(scopes.Single().ExternAliases.Any(a => a is { Name: "CORE2", Target: INamespaceSymbol { IsGlobalNamespace: true } })); 567Assert.True(scopes.Single().ExternAliases.Single() is { Name: "CORE1", Target: INamespaceSymbol { IsGlobalNamespace: true } }); 593Assert.True(scopes[0].ExternAliases.Single() is { Name: "CORE2", Target: INamespaceSymbol { IsGlobalNamespace: true } }); 595Assert.True(scopes[1].ExternAliases.Single() is { Name: "CORE1", Target: INamespaceSymbol { IsGlobalNamespace: true } }); 625Assert.True(scopes.Single().Imports.Single().NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) }); 648Assert.True(scopes.Single().Imports.Single().NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) }); 682Assert.True(scopes.Single().Imports.Any(i => i.NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) })); 684Assert.True(scopes.Single().Imports.Any(i => i.NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: false, Name: nameof(System.IO) })); 688Assert.True(scopes.Single().Aliases.Any(i => i is { Name: "M", Target: INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(Microsoft) } })); 690Assert.True(scopes.Single().Aliases.Any(i => i is { Name: "T", Target: INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: false, Name: nameof(System.Threading) } }));
Compilation\SemanticModelAPITests.cs (2)
1273Assert.True(aliasTarget.IsGlobalNamespace); 3853Assert.True(target.IsGlobalNamespace);
Compilation\SemanticModelGetSemanticInfoTests.cs (3)
4386Assert.True(((INamespaceSymbol)semanticInfo.Type.ContainingSymbol).IsGlobalNamespace); 11645Assert.True(((INamespaceSymbol)semanticInfo.Symbol).IsGlobalNamespace); 11679Assert.True(((INamespaceSymbol)semanticInfo.Symbol).IsGlobalNamespace);
Symbols\Source\DeclaringSyntaxNodeTests.cs (1)
93if (symbol.Kind == SymbolKind.Namespace && ((INamespaceSymbol)symbol).IsGlobalNamespace)
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
Classification\SyntaxClassification\NameSyntaxClassifier.cs (1)
137var isGlobalNamespace = namespaceSymbol.IsGlobalNamespace &&
Simplification\CSharpSimplificationService.Expander.cs (2)
462if (aliasTarget.IsNamespace() && ((INamespaceSymbol)aliasTarget).IsGlobalNamespace) 914if (!replaceNode && symbol.ContainingType == null && symbol.ContainingNamespace.IsGlobalNamespace)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.ExpressionSyntaxGeneratorVisitor.cs (2)
65if (symbol.ContainingNamespace.IsGlobalNamespace) 93if (symbol.ContainingNamespace.IsGlobalNamespace)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
292if (symbol.ContainingNamespace.IsGlobalNamespace) 326if (symbol.ContainingNamespace.IsGlobalNamespace)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
MoveStaticMembers\TestMoveStaticMembersService.cs (1)
55var namespaceDisplay = selectedType.ContainingNamespace.IsGlobalNamespace
Microsoft.CodeAnalysis.Features (17)
AddImport\AbstractAddImportFeatureService.cs (1)
501return symbol.IsNamespace ? !((INamespaceSymbol)symbol).IsGlobalNamespace : true;
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (1)
233if (symbol.ContainingNamespace == null || symbol.ContainingNamespace.IsGlobalNamespace)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
355var fullTypeName = containingNamespace.IsGlobalNamespace
DesignerAttribute\DesignerAttributeDiscoveryService.cs (1)
360ContainingNamespace.ContainingNamespace.ContainingNamespace.IsGlobalNamespace: true,
EmbeddedLanguages\EmbeddedLanguageDetector.cs (2)
182ContainingNamespace.IsGlobalNamespace: true, 479ContainingNamespace.IsGlobalNamespace: true,
ExtractInterface\AbstractExtractInterfaceService.cs (1)
115var containingNamespaceDisplay = refactoringResult.TypeToExtractFrom.ContainingNamespace.IsGlobalNamespace
ExtractMethod\MethodExtractor.VariableSymbol.cs (1)
87ContainingNamespace.IsGlobalNamespace: true,
FindUsages\DefinitionItemFactory.cs (2)
185if (namespaceSymbol.IsGlobalNamespace) 227if (definition is IAssemblySymbol or IModuleSymbol or INamespaceSymbol { IsGlobalNamespace: true } or IPreprocessingSymbol)
FullyQualify\AbstractFullyQualifyService.cs (2)
177.Where(n => !n.IsGlobalNamespace && HasAccessibleTypes(n, semanticModel, cancellationToken)) 313.Where(n => n.Symbol is INamedTypeSymbol or INamespaceSymbol { IsGlobalNamespace: false })
GoToDefinition\GoToDefinitionFeatureHelpers.cs (1)
27if (alias.Target is INamespaceSymbol ns && ns.IsGlobalNamespace)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
526if (symbol.IsGlobalNamespace)
MetadataAsSource\AbstractMetadataAsSourceService.cs (1)
105return topLevelNamespaceSymbol.IsGlobalNamespace
MoveToNamespace\AbstractMoveToNamespaceService.cs (1)
292var offset = symbol.ContainingNamespace.IsGlobalNamespace
RQName\RQNodeBuilder.cs (1)
43while (!@namespace.IsGlobalNamespace)
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\ControlFlowGraphVerifier.cs (1)
1999ContainingNamespace: { IsGlobalNamespace: true }
Microsoft.CodeAnalysis.VisualBasic (8)
SymbolDisplay\SymbolDisplayVisitor.vb (2)
252If symbol.IsGlobalNamespace Then 381(Not (DirectCast(containingSymbol, INamespaceSymbol)).IsGlobalNamespace OrElse
SymbolDisplay\SymbolDisplayVisitor_Minimal.vb (4)
19Debug.Assert(symbol.ContainingNamespace IsNot Nothing OrElse symbol.IsGlobalNamespace) 24If symbol.IsGlobalNamespace Then 64If containingNamespace.IsGlobalNamespace Then 104If symbol.ContainingNamespace.IsGlobalNamespace Then
Symbols\ModuleSymbol.vb (1)
269If namespaceSymbol.IsGlobalNamespace Or namespaceSymbol.ContainingNamespace Is Nothing Then
Symbols\NamespaceSymbol.vb (1)
60Public Overridable ReadOnly Property IsGlobalNamespace As Boolean Implements INamespaceSymbol.IsGlobalNamespace, INamespaceSymbolInternal.IsGlobalNamespace
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (5)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxGeneratorVisitor.vb (2)
47If symbol.ContainingNamespace.IsGlobalNamespace Then 66If symbol.ContainingNamespace.IsGlobalNamespace Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\SymbolExtensions.vb (1)
19(containingNamespace.IsGlobalNamespace OrElse Object.Equals(containingNamespace, compilation.RootNamespace))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (2)
166If symbol.ContainingNamespace.IsGlobalNamespace Then 185If symbol.ContainingNamespace.IsGlobalNamespace Then
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (4)
CodeGen\CodeGenTuples.vb (4)
8950Assert.False(ns.IsGlobalNamespace) 8958Assert.False(ns.IsGlobalNamespace) 8966Assert.False(ns.IsGlobalNamespace) 8977Assert.False(ns.IsGlobalNamespace)
Microsoft.CodeAnalysis.VisualBasic.Features (2)
Completion\CompletionProviders\ImplementsClauseCompletionProvider.vb (1)
257Return [namespace] IsNot Nothing AndAlso [namespace].IsGlobalNamespace
ExtractInterface\VisualBasicExtractInterfaceService.vb (1)
51If namespaceSymbol.IsGlobalNamespace Then
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Compilation\GetImportScopesTests.vb (1)
48Return symbol.Name = aliasName AndAlso symbol.Target.Name = targetName AndAlso TypeOf symbol.Target Is INamespaceSymbol AndAlso DirectCast(symbol.Target, INamespaceSymbol).ContainingNamespace.IsGlobalNamespace = inGlobalNamespace
Microsoft.CodeAnalysis.VisualBasic.Workspaces (6)
Simplification\VisualBasicSimplificationService.Expander.vb (1)
502If aliasTarget.IsNamespace() AndAlso DirectCast(aliasTarget, INamespaceSymbol).IsGlobalNamespace Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxGeneratorVisitor.vb (2)
47If symbol.ContainingNamespace.IsGlobalNamespace Then 66If symbol.ContainingNamespace.IsGlobalNamespace Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\SymbolExtensions.vb (1)
19(containingNamespace.IsGlobalNamespace OrElse Object.Equals(containingNamespace, compilation.RootNamespace))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (2)
166If symbol.ContainingNamespace.IsGlobalNamespace Then 185If symbol.ContainingNamespace.IsGlobalNamespace Then
Microsoft.CodeAnalysis.Workspaces (22)
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
253attrType.ContainingNamespace.ContainingNamespace.ContainingNamespace.ContainingNamespace?.IsGlobalNamespace == true;
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (1)
34SymbolKind.Namespace => !((INamespaceSymbol)symbol).IsGlobalNamespace,
FindSymbols\FindReferences\Finders\NamespaceSymbolReferenceFinder.cs (2)
36if (!symbol.IsGlobalNamespace) 61if (symbol.IsGlobalNamespace)
FindSymbols\SymbolFinder_Helpers.cs (1)
173var candidateFullMetadataName = candidate.ContainingNamespace?.IsGlobalNamespace != false
Recommendations\AbstractRecommendationServiceRunner.cs (1)
291var systemNamespace = container is not (null or INamespaceSymbol { IsGlobalNamespace: true })
Shared\Extensions\INamespaceSymbolExtensions.cs (1)
31if (namespaceSymbol == null || namespaceSymbol.IsGlobalNamespace)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
681ContainingNamespace.IsGlobalNamespace: true,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamespaceOrTypeSymbolExtensions.cs (1)
76if (namespaceOrTypeSymbol == null || (namespaceOrTypeSymbol.IsNamespace && ((INamespaceSymbol)namespaceOrTypeSymbol).IsGlobalNamespace))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (4)
238b.ContainingNamespace.ContainingNamespace.IsGlobalNamespace) 252&& symbol.ContainingNamespace.ContainingNamespace?.IsGlobalNamespace == true; 751ContainingNamespace: { Name: nameof(System), ContainingNamespace.IsGlobalNamespace: true } 759ContainingNamespace: { Name: nameof(System), ContainingNamespace.IsGlobalNamespace: true }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamespaceSymbolKey.cs (1)
37Debug.Assert(symbol.IsGlobalNamespace);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (3)
549if (x.IsGlobalNamespace != y.IsGlobalNamespace || 555if (x.IsGlobalNamespace && symbolEquivalenceComparer._assemblyComparer == null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (2)
211if (x.IsGlobalNamespace && _symbolEquivalenceComparer._assemblyComparer == null) 218Hash.Combine(x.IsGlobalNamespace,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
52((INamespaceSymbol)containingSymbol.ContainingSymbol).IsGlobalNamespace)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
411ContainingNamespace.IsGlobalNamespace: true,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (1)
206if (namespaceSymbol is null || namespaceSymbol.IsGlobalNamespace)
Microsoft.Extensions.Options.SourceGeneration (2)
Parser.cs (2)
137validatorType.ContainingNamespace.IsGlobalNamespace ? string.Empty : validatorType.ContainingNamespace.ToString()!, 716mt.ContainingNamespace.IsGlobalNamespace ? string.Empty : mt.ContainingNamespace.ToString()!,
Microsoft.Gen.ContextualOptions (1)
Model\OptionsContextType.cs (1)
18public string? Namespace => Symbol.ContainingNamespace.IsGlobalNamespace ? null : Symbol.ContainingNamespace.ToString();
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
EmitterTests.cs (1)
112Mock.Of<INamedTypeSymbol>(sym => sym.Name == "NamespacelessRecord" && sym.ContainingNamespace.IsGlobalNamespace),
Microsoft.Gen.Logging (1)
src\Generators\Shared\SymbolHelpers.cs (1)
17return symbol.ContainingNamespace.IsGlobalNamespace ? string.Empty : symbol.ContainingNamespace.ToString();
Microsoft.Gen.Metrics (1)
src\Generators\Shared\SymbolHelpers.cs (1)
17return symbol.ContainingNamespace.IsGlobalNamespace ? string.Empty : symbol.ContainingNamespace.ToString();
Microsoft.Interop.JavaScript.JSImportGenerator (1)
JSSignatureContext.cs (1)
83if (!method.ContainingType.ContainingNamespace.IsGlobalNamespace)
Microsoft.VisualStudio.LanguageServices (9)
ExtractClass\VisualStudioExtractClassOptionsService.cs (1)
73var containingNamespaceDisplay = selectedType.ContainingNamespace.IsGlobalNamespace
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (3)
72if (namespaceSymbol.IsGlobalNamespace) 101if (splitLink && !typeSymbol.ContainingNamespace.IsGlobalNamespace) 248((INamespaceSymbol)containingSymbol).IsGlobalNamespace)
Library\ObjectBrowser\Extensions.cs (1)
43return !namespaceSymbol.IsGlobalNamespace
Library\VsNavInfo\NavInfoFactory.cs (1)
227return !namespaceSymbol.IsGlobalNamespace
MoveStaticMembers\VisualStudioMoveStaticMembersOptionsService.cs (1)
120var containingNamespaceDisplay = selectedType.ContainingNamespace.IsGlobalNamespace
Progression\GraphNodeIdCreation.cs (2)
84if (includeNamespace && !typeParameter.ContainingNamespace.IsGlobalNamespace) 110else if (underlyingType.ContainingNamespace != null && !underlyingType.ContainingNamespace.IsGlobalNamespace)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\CSharpCodeModelService_Prototype.cs (1)
564if (!includeNamespaces || ((INamespaceSymbol)symbol).IsGlobalNamespace)
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
157Namespace = contextTypeSymbol.ContainingNamespace is { IsGlobalNamespace: false } ns ? ns.ToDisplayString() : null,