1 write to NamespaceOrType
Microsoft.CodeAnalysis.CSharp (1)
Binder\NamespaceOrTypeAndUsingDirective.cs (1)
19this.NamespaceOrType = namespaceOrType;
37 references to NamespaceOrType
Microsoft.CodeAnalysis.CSharp (23)
Binder\ImportChain.cs (1)
79NamespaceOrTypeSymbol namespaceOrType = nsOrType.NamespaceOrType;
Binder\Imports.cs (5)
54Usings.Select(u => u.NamespaceOrType.ToString())).Concat( 102var previousTarget = previousUsing.NamespaceOrType; 217return x.NamespaceOrType.Equals(y.NamespaceOrType); 222return obj.NamespaceOrType.GetHashCode();
Binder\WithUsingNamespacesAndTypesBinder.cs (7)
55var fullName = typeOrNamespace.NamespaceOrType + "." + name; 59qualifierOpt = typeOrNamespace.NamespaceOrType; 90switch (nsOrType.NamespaceOrType.Kind) 95((NamespaceSymbol)nsOrType.NamespaceOrType).GetExtensionMethods(methods, name, arity, options); 110((NamedTypeSymbol)nsOrType.NamespaceOrType).GetExtensionMethods(methods, name, arity, options); 139ImmutableArray<Symbol> candidates = Binder.GetCandidateMembers(typeOrNamespace.NamespaceOrType, name, options, originalBinder: originalBinder); 207foreach (var member in namespaceSymbol.NamespaceOrType.GetMembersUnordered())
Compilation\CSharpCompilation.cs (2)
1476uniqueUsings.AddAll(usingsFromoptions.UsingNamespacesOrTypes.Select(static unt => unt.NamespaceOrType)); 1480if (uniqueUsings.Add(previousUsing.NamespaceOrType))
Compilation\CSharpCompilation.UsingsFromOptionsAndDiagnostics.cs (1)
143NamespaceOrTypeSymbol target = @using.NamespaceOrType;
Compilation\CSharpSemanticModel.cs (1)
5331imports.Usings.SelectAsArray(static n => new ImportedNamespaceOrType(n.NamespaceOrType.GetPublicSymbol(), n.UsingDirectiveReference)),
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (6)
315uniqueUsings.AddAll(namespacesOrTypes.Select(n => n.NamespaceOrType)); 321if (!uniqueUsings.Add(namespaceOrType.NamespaceOrType)) 323diagnostics.Add(ErrorCode.HDN_DuplicateWithGlobalUsing, namespaceOrType.UsingDirective!.NamespaceOrType.Location, namespaceOrType.NamespaceOrType); 820uniqueUsings.AddAll(globalUsingNamespacesOrTypes.Select(n => n.NamespaceOrType)); 831uniqueUsings.AddAll(globalUsingNamespacesOrTypes.Where(n => n.UsingDirectiveReference?.SyntaxTree != tree).Select(n => n.NamespaceOrType)); 965NamespaceOrTypeSymbol target = @using.NamespaceOrType;
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (10)
UsingDebugInfoTests.cs (10)
466Assert.Equal("System", imports.Usings.Single().NamespaceOrType.ToTestDisplayString()); 497Assert.Equal("System", imports.Usings.Single().NamespaceOrType.ToTestDisplayString()); 534Assert.Equal("System.IO", imports.Usings.Single().NamespaceOrType.ToTestDisplayString()); // Note: some information is preserved. 574Assert.Equal("System", imports.Usings.Single().NamespaceOrType.ToTestDisplayString()); // Note: some information is preserved. 649var actualNamespace = imports.Usings.Single().NamespaceOrType; 684var usings = imports.Usings.Select(u => u.NamespaceOrType).ToArray(); 733var actualNamespace = imports.Usings.Single().NamespaceOrType; 808var actualType = imports.Usings.Single().NamespaceOrType; 896var importedNamespace = @using.NamespaceOrType; 1032var importedNamespace = @using.NamespaceOrType;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\ImportsTests.cs (4)
47Assert.Equal(new[] { "System", "System.IO" }, concat1.Usings.Select(u => u.NamespaceOrType.ToTestDisplayString())); 55Assert.Equal(new[] { "System.IO", "System" }, concat2.Usings.Select(u => u.NamespaceOrType.ToTestDisplayString())); 83Assert.Equal(new[] { "System", "System.Collections", "System.IO" }, concat1.Usings.Select(u => u.NamespaceOrType.ToTestDisplayString())); 92Assert.Equal(new[] { "System", "System.IO", "System.Collections" }, concat2.Usings.Select(u => u.NamespaceOrType.ToTestDisplayString()));