2 implementations of GlobalNamespace
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\ModuleSymbol.cs (1)
24INamespaceSymbol IModuleSymbol.GlobalNamespace
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\ModuleSymbol.vb (1)
297Private ReadOnly Property IModuleSymbol_GlobalNamespace As INamespaceSymbol Implements IModuleSymbol.GlobalNamespace
351 references to GlobalNamespace
Microsoft.CodeAnalysis (1)
Compilation\Compilation.cs (1)
1037INamespaceSymbol container = this.SourceModule.GlobalNamespace;
Microsoft.CodeAnalysis.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CompilationExtensions.cs (1)
75foreach (var candidateTopLevelType in compilation.SourceModule.GlobalNamespace.GetTypeMembers(WellKnownMemberNames.TopLevelStatementsEntryPointTypeName, arity: 0))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamespaceSymbolKey.cs (1)
100result.AddIfNotNull(module.GlobalNamespace);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (25)
SymbolKey\SymbolKeyCompilationsTests.cs (12)
98var symbol01 = comp1.SourceModule.GlobalNamespace.GetMembers().FirstOrDefault() as NamedTypeSymbol; 99var symbol02 = comp1.SourceModule.GlobalNamespace.GetMembers().FirstOrDefault() as NamedTypeSymbol; 130var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as INamespaceSymbol; 157var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as INamespaceSymbol; 185var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as INamespaceSymbol; 228var type = compilation.SourceModule.GlobalNamespace.GetTypeMembers("C").Single(); 463var namespace1 = comp1.SourceModule.GlobalNamespace.GetMembers("NS").Single() as INamespaceSymbol; 466var namespace2 = comp2.SourceModule.GlobalNamespace.GetMembers("NS").Single() as INamespaceSymbol; 546var typeSym1 = comp1.SourceModule.GlobalNamespace.GetTypeMembers("Test").Single(); 549var typeSym2 = comp2.SourceModule.GlobalNamespace.GetTypeMembers("Test").Single(); 571var namespace1 = comp1.SourceModule.GlobalNamespace.GetMembers("NS").Single() as INamespaceSymbol; 574var namespace2 = comp2.SourceModule.GlobalNamespace.GetMembers("NS").Single() as INamespaceSymbol;
SymbolKey\SymbolKeyMetadataVsSourceTests.cs (3)
71var typesym = comp2.SourceModule.GlobalNamespace.GetTypeMembers("App").FirstOrDefault(); 239var typeA = comp20.SourceModule.GlobalNamespace.GetTypeMembers("A").Single(); 254var typeTest = comp40.SourceModule.GlobalNamespace.GetTypeMembers("Test").FirstOrDefault();
SymbolKey\SymbolKeyTestBase.cs (1)
202GetSourceMemberSymbols(compilation.SourceModule.GlobalNamespace.GetPublicSymbol(), list, localDumper);
Workspaces\WorkspaceTests_EditorFeatures.cs (9)
415var classC = compilation.SourceModule.GlobalNamespace.GetMembers("C").Single(); 438var classD = compilation2.SourceModule.GlobalNamespace.GetTypeMembers("D").Single(); 466var classD = compilation2.SourceModule.GlobalNamespace.GetTypeMembers("D").Single(); 500var classD = compilation2.SourceModule.GlobalNamespace.GetTypeMembers("D").Single(); 518var classDz = compilation2Z.SourceModule.GlobalNamespace.GetTypeMembers("D").Single(); 554var classDy = compilation2y.SourceModule.GlobalNamespace.GetTypeMembers("D").Single(); 622var classDy = compilation2y.SourceModule.GlobalNamespace.GetTypeMembers("D").Single(); 652var classDz = compilation2Z.SourceModule.GlobalNamespace.GetTypeMembers("D").Single(); 673var classDz = compilation2Z.SourceModule.GlobalNamespace.GetTypeMembers("D").Single();
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (9)
CodeGen\CodeGenAsyncIteratorTests.cs (1)
2063var m = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C.M");
CodeGen\CodeGenTupleTest.cs (8)
4593var mTuple = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMember<MethodSymbol>("M").ReturnType; 4623var m2Tuple = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMember<MethodSymbol>("M2").Parameters[0].Type; 6240ns = comp.CreateErrorNamespaceSymbol(comp.SourceModule.GlobalNamespace, "a"); 6244Assert.Same(comp.SourceModule.GlobalNamespace, ns.ContainingSymbol); 6245Assert.Same(comp.SourceModule.GlobalNamespace.ContainingAssembly, ns.ContainingAssembly); 6246Assert.Same(comp.SourceModule.GlobalNamespace.ContainingModule, ns.ContainingModule); 6261vt2 = comp.CreateErrorTypeSymbol(comp.CreateErrorNamespaceSymbol(comp.SourceModule.GlobalNamespace, "System"), "ValueTuple", 2).Construct(intType, intType); 6600var tuple1 = (INamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMember<INamedTypeSymbol>("C").GetMember<IFieldSymbol>("F").Type;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (46)
Attributes\AttributeTests.cs (3)
1494var attrs = compilation.SourceModule.GlobalNamespace.GetMember("A").GetAttributes(); 1518var attrs = compilation.SourceModule.GlobalNamespace.GetMember("Goo").GetAttributes(); 5420var global = comp.SourceModule.GlobalNamespace;
FlowAnalysis\FlowTestBase.cs (1)
24foreach (var method in AllMethods(compilation.SourceModule.GlobalNamespace))
RefStructInterfacesTests.cs (42)
4481var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 4489var d = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("D"); 4515var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 4544var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 4566var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 4598var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 4624var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 4656var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 4691var method = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C.M"); 4728var method = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C.M"); 4754var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 4783var method = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C.M"); 4820var method = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C.M"); 4849var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 4871var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 4900var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 4922var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 4950var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 4977var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 5008var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 5037var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 5062var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 5091var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 5115var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 5142var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 5163var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 5184var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 5209var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 5234var c = comp.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C"); 5259var method = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C.M"); 5288var method = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C.M"); 5317var method = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C.M"); 5346var method = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C.M"); 5375var method = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C.M"); 5419var method1 = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C2.M1"); 5423var method2 = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C3.M2"); 5513var method1 = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C2.M1"); 5518var method2 = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C2.M2"); 5556var method1 = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C2.C1.M1"); 5560var method2 = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C2.C1.M2"); 5642var method1 = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C2.C1<C>.M1"); 5647var method2 = comp.SourceModule.GlobalNamespace.GetMember<MethodSymbol>("C2.C1<C>.M2");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (51)
Semantics\InterpolationTests.cs (12)
6823var sParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Single(); 6916var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Single(); 6991var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Skip(1).Single(); 7069var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Skip(1).Single(); 7144var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Skip(1).Single(); 7219var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Skip(1).Single(); 7252var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Skip(1).Single(); 7447var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Single(); 7524var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod(".ctor").Parameters.Single(); 7601var c = comp.SourceModule.GlobalNamespace.GetTypeMember("C"); 7602var handler = comp.SourceModule.GlobalNamespace.GetTypeMember("CustomHandler"); 8017var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Skip(1).Single();
Semantics\NullableReferenceTypesTests.cs (17)
100381var f1 = (MethodSymbol)m.GlobalNamespace.GetMember("B.F1"); 100388var f2 = (MethodSymbol)m.GlobalNamespace.GetMember("B.F2"); 100420var f1 = (MethodSymbol)m.GlobalNamespace.GetMember("B.F1"); 100440var f1 = (MethodSymbol)m.GlobalNamespace.GetMember("B.F1"); 100495var f1 = (MethodSymbol)m.GlobalNamespace.GetMember("B.F1"); 100503var f2 = (MethodSymbol)m.GlobalNamespace.GetMember("B.F2"); 100539var f1 = (MethodSymbol)m.GlobalNamespace.GetMember("B.F1"); 100546var f2 = (MethodSymbol)m.GlobalNamespace.GetMember("B.F2"); 100571Assert.True(((MethodSymbol)comp.SourceModule.GlobalNamespace.GetMember("B.F1")).TypeParameters[0].IsNotNullable); 100584var f1 = (MethodSymbol)m.GlobalNamespace.GetMember("B.F1"); 100591var f2 = (MethodSymbol)m.GlobalNamespace.GetMember("B.F2"); 100623var f1 = (MethodSymbol)m.GlobalNamespace.GetMember("B.F1"); 100917var f1 = (MethodSymbol)m.GlobalNamespace.GetMember("B.F1"); 100966var f1 = (MethodSymbol)m.GlobalNamespace.GetMember("B.F1"); 100993var f1 = (MethodSymbol)m.GlobalNamespace.GetMember("B.F1"); 105040var f1 = (MethodSymbol)m.GlobalNamespace.GetMember("B.F1"); 105043var f2 = (MethodSymbol)m.GlobalNamespace.GetMember("B.F2");
Semantics\RawInterpolationTests_Handler.cs (11)
5079var sParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Single(); 5184var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Single(); 5271var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Skip(1).Single(); 5361var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Skip(1).Single(); 5448var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Skip(1).Single(); 5535var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Skip(1).Single(); 5716var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Single(); 5805var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod(".ctor").Parameters.Single(); 5894var c = comp.SourceModule.GlobalNamespace.GetTypeMember("C"); 5895var handler = comp.SourceModule.GlobalNamespace.GetTypeMember("CustomHandler"); 6202var cParam = comp.SourceModule.GlobalNamespace.GetTypeMember("C").GetMethod("M").Parameters.Skip(1).Single();
Semantics\SemanticErrorTests.cs (7)
3252var type1 = comp.SourceModule.GlobalNamespace.GetMembers("MyClass").Single() as NamedTypeSymbol; 25113Assert.True(comp.SourceModule.GlobalNamespace.GetMembersUnordered().Single(m => m.Name == "A").HasComplete(CompletionPart.All)); 25114var bSymbol = (SourceNamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembersUnordered().Single(m => m.Name == "B"); 25181var aSymbol = (SourceNamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembersUnordered().Single(m => m.Name == "A"); 25185var eSymbol = (SourceNamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembersUnordered().Single(m => m.Name == "E"); 25278Assert.True(comp.SourceModule.GlobalNamespace.GetMembersUnordered().Single(m => m.Name == "A").HasComplete(CompletionPart.All)); 25279var bSymbol = (SourceNamespaceSymbol)comp.SourceModule.GlobalNamespace.GetMembersUnordered().Single(m => m.Name == "B");
Semantics\TopLevelStatementsTests.cs (4)
6230var a = ((Compilation)comp).SourceModule.GlobalNamespace.GetTypeMember("A"); 6274var a = ((Compilation)comp).SourceModule.GlobalNamespace.GetTypeMember("A"); 6314var a = ((Compilation)comp).SourceModule.GlobalNamespace.GetTypeMember("A"); 6364var a = ((Compilation)comp).SourceModule.GlobalNamespace.GetTypeMember("A");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (195)
Compilation\GetSemanticInfoTests.cs (1)
389var tsym = comp.SourceModule.GlobalNamespace.GetTypeMembers("Test").FirstOrDefault();
Compilation\SemanticModelAPITests.cs (2)
841var mems = comp.SourceModule.GlobalNamespace.GetMembers(); 867var pTypeSym = comp.SourceModule.GlobalNamespace.GetTypeMembers("PC").Single();
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (7)
2786var globalNS = compilation.SourceModule.GlobalNamespace; 2907var globalNS = compilation.SourceModule.GlobalNamespace; 2969var globalNS = compilation.SourceModule.GlobalNamespace; 3018var globalNS = compilation.SourceModule.GlobalNamespace; 3045var globalNS = compilation.SourceModule.GlobalNamespace; 3075var globalNS = compilation.SourceModule.GlobalNamespace; 3141var globalNS = compilation.SourceModule.GlobalNamespace;
Compilation\SymbolVisitorTests.cs (3)
111VisitChildren(symbol.GlobalNamespace); 290VisitChildren(symbol.GlobalNamespace); 403VisitChildren(new[] { symbol.GlobalNamespace }, argument);
SymbolDisplay\SymbolDisplayTests.cs (1)
4567var tsym1 = comp1.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("Gen");
Symbols\AssemblyAndNamespaceTests.cs (2)
63Assert.Equal(String.Empty, sym.GlobalNamespace.Name); 334var globalNS = compilation.SourceModule.GlobalNamespace;
Symbols\CheckedUserDefinedOperatorsTests.cs (59)
164var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 355var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 380var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 456var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 483var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 515var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 533expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 541expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 687var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 705expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 713expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 810var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 818expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 826expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 859var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 867expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 875expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 903var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 937var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 980var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 1016var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 1370var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 1525var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 1552var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 1634var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 1661var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 1695var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 1714expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 1722expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 1818var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1836expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1851expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1884var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1892expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1900expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1928var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1946expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 1954expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2053var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2071expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2079expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2112var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2120expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2128expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 2180var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 2225var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 2440var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 2467var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 2616var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 2757var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 2780var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 2854var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 2872expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 2880expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 3020var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 3038expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 3046expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).Single(); 3187var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 3219var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C");
Symbols\DefaultInterfaceImplementationTests.cs (3)
4887var derived = compilation1.SourceModule.GlobalNamespace.GetTypeMember("Test1"); 36893var @interface = comp.SourceModule.GlobalNamespace.GetTypeMember("I"); 44756var i1 = compilation1.SourceModule.GlobalNamespace.GetTypeMember("I1");
Symbols\IndexerTests.cs (2)
2403NamedTypeSymbol type01 = comp.SourceModule.GlobalNamespace.GetTypeMembers("Test").Single(); 2836var typeSymbol = comp1.SourceModule.GlobalNamespace.GetMember<NamedTypeSymbol>("IGoo");
Symbols\Metadata\MetadataMemberTests.cs (1)
396var classC = compilation.SourceModule.GlobalNamespace.GetTypeMembers("C").Single();
Symbols\Metadata\PE\NoPia.cs (4)
1235var varI5 = varC_Pia5.SourceModule.GlobalNamespace.GetTypeMembers("I5").Single(); 1237var varI6 = varC_Pia5.SourceModule.GlobalNamespace.GetTypeMembers("I6").Single(); 1245var varI7 = varC_Library2.SourceModule.GlobalNamespace.GetTypeMembers("I7").Single(); 1257var varI1 = varC_Pia1.SourceModule.GlobalNamespace.GetTypeMembers("I1").Single();
Symbols\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.cs (1)
33NamedTypeSymbol classLocalType1 = localConsumer1.SourceModule.GlobalNamespace.GetTypeMembers("NoPIAGenerics").Single();
Symbols\RequiredMembersTests.cs (1)
1279var prop = comp.SourceModule.GlobalNamespace.GetMember<PropertySymbol>("C.Prop");
Symbols\Retargeting\RetargetingTests.cs (5)
41var sourceNamespace = sourceModule.GlobalNamespace; 112var sourceNamespace = sourceModule.GlobalNamespace; 145var sourceNamespace = sourceModule.GlobalNamespace; 179var sourceNamespace = sourceModule.GlobalNamespace; 215var sourceNamespace = sourceModule.GlobalNamespace;
Symbols\Source\BaseClassTests.cs (4)
1440NamespaceSymbol nif = (NamespaceSymbol)comp.SourceModule.GlobalNamespace.GetMembers("if").Single(); 1465NamespaceSymbol nif = (NamespaceSymbol)comp.SourceModule.GlobalNamespace.GetMembers("if").Single(); 1523var classB = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("B")[0]; 1539var classB = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("B")[0];
Symbols\Source\DeclaringSyntaxNodeTests.cs (1)
193Assert.True(comp.SourceModule.GlobalNamespace.IsImplicitlyDeclared);
Symbols\Source\DelegateTests.cs (6)
228NamedTypeSymbol dout = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("out").Single(); 338NamedTypeSymbol d = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("D").Single(); 392NamedTypeSymbol d = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("D").Single(); 423NamedTypeSymbol d = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("D").Single(); 454NamedTypeSymbol d = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("D").Single(); 488NamedTypeSymbol d = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("D").Single();
Symbols\Source\EnumTests.cs (2)
757var classEnum = comp.SourceModule.GlobalNamespace.GetMembers("EnumPartial").Single() as NamedTypeSymbol; 1005var global = comp.SourceModule.GlobalNamespace;
Symbols\Source\EventTests.cs (2)
59NamedTypeSymbol c1 = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("C1").Single(); 324NamedTypeSymbol type01 = comp.SourceModule.GlobalNamespace.GetTypeMembers("C").Single();
Symbols\Source\FieldTests.cs (2)
235NamedTypeSymbol c1 = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("C1").Single(); 255NamedTypeSymbol type1 = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("C").Single();
Symbols\Source\MethodTests.cs (2)
1326var derivedClass = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("DerivedClass")[0]; 1618NamedTypeSymbol c1 = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("C1").Single();
Symbols\Source\PropertyTests.cs (2)
449NamedTypeSymbol c1 = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("C1").Single(); 1954var globalNamespace = comp.SourceModule.GlobalNamespace;
Symbols\StaticAbstractMembersInInterfacesTests.cs (4)
32190var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 32227var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 32438var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C"); 32625var c = compilation1.SourceModule.GlobalNamespace.GetTypeMember("C");
Symbols\SymbolErrorTests.cs (63)
1472var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 1498var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 1517var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 1535var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 1548var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 1573var classA = comp.SourceModule.GlobalNamespace.GetTypeMembers("A").Single() as NamedTypeSymbol; 1685var ns3 = comp.SourceModule.GlobalNamespace.GetMember<NamespaceSymbol>("n3"); 2335var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 2457var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 2556var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 2585var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3088var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3144var ns = comp.SourceModule.GlobalNamespace.GetTypeMembers("A").Single() as NamedTypeSymbol; 3364var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3578var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3600var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3636var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3658var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3705var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3733var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3759var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3784var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3948var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 4376var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 4756var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 5414var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 5556var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 5599var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 7462var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 8083var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 8202var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 8235var nsNamespace = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 8668var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 9164var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 9194var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 9214var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 9238var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 9261var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 9287var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 9317var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 9335var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 11028var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 11456var ns = comp.SourceModule.GlobalNamespace.GetMembers("x").Single() as NamespaceSymbol; 12346var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 12522var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 12676var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 12725var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 13054var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 13084var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 13114var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 13475var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 13523var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 14560var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 14682var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 15097var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 15143var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 17650var ns = comp.SourceModule.GlobalNamespace.GetMembers("SA").Single() as NamespaceSymbol; 17687var ns = comp.SourceModule.GlobalNamespace.GetMembers("SA").Single() as NamespaceSymbol; 17930var ns = comp.SourceModule.GlobalNamespace.GetMembers("SA").Single() as NamespaceSymbol; 19374var derived = comp.SourceModule.GlobalNamespace.GetTypeMembers("Derived").Single(); 19407var b = comp.SourceModule.GlobalNamespace.GetMembers("B").Single() as NamespaceSymbol; 19422var b = comp.SourceModule.GlobalNamespace.GetMembers("B").Single() as NamespaceSymbol; 19453var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol;
Symbols\TypeTests.cs (9)
540var globalNS = compilation.SourceModule.GlobalNamespace; 588var globalNS = compilation.SourceModule.GlobalNamespace; 904var globalNS = comp.SourceModule.GlobalNamespace; 1238var global = comp.SourceModule.GlobalNamespace; 1305var global = comp.SourceModule.GlobalNamespace; 1455var errSymbol = comp.SourceModule.GlobalNamespace.GetMembers().FirstOrDefault() as NamedTypeSymbol; 1504var topType = comp.SourceModule.GlobalNamespace.GetTypeMembers("NullableTest").FirstOrDefault(); 1611var topType = comp.SourceModule.GlobalNamespace.GetTypeMembers("S").FirstOrDefault(); 1613var enumType = comp.SourceModule.GlobalNamespace.GetTypeMembers("E").Single();
Symbols\UnsignedRightShiftTests.cs (6)
2706var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 2724expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 2732expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 2878var expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 2896expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First(); 2904expectedSymbol = compilation.SourceModule.GlobalNamespace.GetTypeMember("C").GetMembers().OfType<MethodSymbol>().Where(m => m.MethodKind != MethodKind.Constructor).First();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
1329VerifyUsesOfNullability(createCompilationLambda().SourceModule.GlobalNamespace, expectedUsesOfNullable: ImmutableArray<string>.Empty);
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\ModuleSymbol.vb (1)
297Private ReadOnly Property IModuleSymbol_GlobalNamespace As INamespaceSymbol Implements IModuleSymbol.GlobalNamespace
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (5)
CodeGen\CodeGenTuples.vb (5)
8964ns = comp.CreateErrorNamespaceSymbol(comp.SourceModule.GlobalNamespace, "a") 8968Assert.Same(comp.SourceModule.GlobalNamespace, ns.ContainingSymbol) 8969Assert.Same(comp.SourceModule.GlobalNamespace.ContainingAssembly, ns.ContainingAssembly) 8970Assert.Same(comp.SourceModule.GlobalNamespace.ContainingModule, ns.ContainingModule) 8985vt2 = comp.CreateErrorTypeSymbol(comp.CreateErrorNamespaceSymbol(comp.SourceModule.GlobalNamespace, "System"), "ValueTuple", 2).Construct(intType, intType)
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (2)
CompilationContext.vb (2)
211Me.Compilation.SourceModule.GlobalNamespace, 227Me.Compilation.SourceModule.GlobalNamespace,
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
FlowAnalysis\FlowTestBase.vb (1)
25For Each method In AllMethods(compilation.SourceModule.GlobalNamespace)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (7)
SymbolsTests\Metadata\PE\NoPia.vb (4)
941Dim varI5 = varC_Pia5.SourceModule.GlobalNamespace.GetTypeMembers("I5").Single() 943Dim varI6 = varC_Pia5.SourceModule.GlobalNamespace.GetTypeMembers("I6").Single() 949Dim varI7 = varC_Library2.SourceModule.GlobalNamespace.GetTypeMembers("I7").Single() 958Dim varI1 = varC_Pia1.SourceModule.GlobalNamespace.GetTypeMembers("I1").Single()
SymbolsTests\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.vb (1)
32Dim classLocalType1 As NamedTypeSymbol = localConsumer1.SourceModule.GlobalNamespace.GetTypeMembers("NoPIAGenerics").[Single]()
SymbolsTests\Source\OverridesTests.vb (1)
6726For Each namedType In compilation.SourceModule.GlobalNamespace.GetTypeMembers()
SymbolsTests\Source\TypeTests.vb (1)
690Dim globalNS = comp.SourceModule.GlobalNamespace
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CompilationExtensions.cs (1)
75foreach (var candidateTopLevelType in compilation.SourceModule.GlobalNamespace.GetTypeMembers(WellKnownMemberNames.TopLevelStatementsEntryPointTypeName, arity: 0))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamespaceSymbolKey.cs (1)
100result.AddIfNotNull(module.GlobalNamespace);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ProjectSystemShim\CSharpEntryPointFinder.cs (1)
24visitor.Visit(compilation.SourceModule.GlobalNamespace);
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
ProjectSystemShim\VisualBasicEntryPointFinder.vb (2)
29Dim symbol = compilation.SourceModule.GlobalNamespace 34symbol = symbol.ContainingCompilation.SourceModule.GlobalNamespace