2 instantiations of Imports
Microsoft.CodeAnalysis.CSharp (2)
Binder\Imports.cs (2)
27
internal static readonly Imports Empty = new
Imports
(
165
return new
Imports
(usingAliases, usings, externs);
54 references to Imports
Microsoft.CodeAnalysis.CSharp (51)
Binder\Binder_Lookup.cs (6)
272
Imports
submissionImports;
275
submissionImports =
Imports
.Empty;
287
submissionImports =
Imports
.Empty;
317
submissionImports =
Imports
.ExpandPreviousSubmissionImports(submissionImports, Compilation);
1903
var
submissionImports = submission.GetSubmissionImports();
1906
submissionImports =
Imports
.ExpandPreviousSubmissionImports(submissionImports, Compilation);
Binder\ImportChain.cs (2)
19
public readonly
Imports
Imports;
22
public ImportChain(
Imports
imports, ImportChain parentOpt)
Binder\Imports.cs (8)
27
internal static readonly
Imports
Empty = new Imports(
60
internal static
Imports
ExpandPreviousSubmissionImports(
Imports
previousSubmissionImports, CSharpCompilation newSubmission)
85
return
Imports
.Create(
151
public static
Imports
Create(
171
internal
Imports
Concat(
Imports
otherImports)
189
return
Imports
.Create(usingAliases, usings, externAliases);
Binder\WithExternAndUsingAliasesBinder.cs (2)
217
previous = new ImportChain(
Imports
.Empty, previous);
262
return new ImportChain(
Imports
.Create(_usingAliases, ((WithUsingNamespacesAndTypesBinder)Next!).GetUsings(basesBeingResolved: null), _externAliases), Next!.ImportChain);
Binder\WithUsingNamespacesAndTypesBinder.cs (7)
252
protected abstract
Imports
GetImports();
293
protected override
Imports
GetImports()
303
private
Imports
? _lazyFullImports;
318
private
Imports
GetImports(ConsList<TypeSymbol>? basesBeingResolved)
330
protected override
Imports
GetImports()
352
protected override
Imports
GetImports()
354
return
Imports
.Create(ImmutableDictionary<string, AliasAndUsingDirective>.Empty, _usings, ImmutableArray<AliasAndExternAliasDirective>.Empty);
Compilation\CSharpCompilation.cs (9)
56
private
Imports
? _lazyPreviousSubmissionImports;
1574
var previousSubmissionImports = previousSubmission is object ?
Imports
.ExpandPreviousSubmissionImports(previousSubmission.GlobalImports, this) : ImmutableArray<NamespaceOrTypeAndUsingDirective>.Empty;
1615
internal
Imports
GetSubmissionImports()
1624
return
Imports
.Empty;
1633
internal
Imports
GetPreviousSubmissionImports()
1636
private
Imports
ExpandPreviousSubmissionImports()
1643
return
Imports
.Empty;
1646
return
Imports
.ExpandPreviousSubmissionImports(previous.GetPreviousSubmissionImports(), this).Concat(
1647
Imports
.ExpandPreviousSubmissionImports(previous.GetSubmissionImports(), this));
Compilation\CSharpSemanticModel.cs (1)
5413
var
imports = chain.Imports;
Symbols\AliasSymbol.cs (1)
89
var expandedNamespace =
Imports
.ExpandPreviousSubmissionNamespace((NamespaceSymbol)previousTarget, expandedGlobalNamespace);
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (15)
21
public
Imports
GetImports(CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved)
28
var
result = GetGlobalUsingImports(basesBeingResolved);
30
var
calculated = GetAliasesAndUsingsForAsserts(declarationSyntax).GetImports(this, declarationSyntax, basesBeingResolved);
31
if (result ==
Imports
.Empty || calculated ==
Imports
.Empty)
51
Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetImports(this, declarationSyntax, basesBeingResolved) ==
Imports
.Empty);
53
return
Imports
.Empty;
238
private
Imports
GetGlobalUsingImports(ConsList<TypeSymbol>? basesBeingResolved)
406
private
Imports
? _lazyImports;
898
internal
Imports
GetImports(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved)
903
Imports
.Create(GetUsingAliasesMap(declaringSymbol, declarationSyntax, basesBeingResolved),
1112
private
Imports
? _lazyImports;
1125
_lazyImports =
Imports
.Empty
1132
public
Imports
Imports
1139
Imports
.Create(UsingAliasesMap ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty,
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\ImportsTests.cs (3)
24
var
empty = Imports.Empty;
123
var
imports1 = Imports.Create(
128
var
imports2 = Imports.Create(