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