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