2 instantiations of AliasAndUsingDirective
Microsoft.CodeAnalysis.CSharp (2)
Binder\Imports.cs (1)
78expandedAliasesBuilder.Add(name, new AliasAndUsingDirective(directive.Alias.ToNewSubmission(newSubmission), directive.UsingDirective));
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (1)
707var aliasAndDirective = new AliasAndUsingDirective(new AliasSymbolFromSyntax(declaringSymbol, usingDirective), usingDirective);
60 references to AliasAndUsingDirective
Microsoft.CodeAnalysis.CSharp (60)
Binder\Binder_Lookup.cs (5)
373protected bool IsUsingAlias(ImmutableDictionary<string, AliasAndUsingDirective> usingAliases, string name, bool callerIsSemanticModel) 375AliasAndUsingDirective node; 398ImmutableDictionary<string, AliasAndUsingDirective> usingAliases, 411AliasAndUsingDirective alias; 1917ImmutableDictionary<string, AliasAndUsingDirective> usingAliases,
Binder\Binder_Statements.cs (1)
4080internal virtual ImmutableArray<AliasAndUsingDirective> UsingAliases
Binder\ImportChain.cs (2)
95ImmutableDictionary<string, AliasAndUsingDirective> aliasSymbols = Imports.UsingAliases; 104var aliasAndUsingDirective = aliasSymbols[alias];
Binder\Imports.cs (7)
28ImmutableDictionary<string, AliasAndUsingDirective>.Empty, 32public readonly ImmutableDictionary<string, AliasAndUsingDirective> UsingAliases; 37ImmutableDictionary<string, AliasAndUsingDirective> usingAliases, 70var expandedAliases = ImmutableDictionary<string, AliasAndUsingDirective>.Empty; 73var expandedAliasesBuilder = ImmutableDictionary.CreateBuilder<string, AliasAndUsingDirective>(); 77var directive = pair.Value; 152ImmutableDictionary<string, AliasAndUsingDirective> usingAliases,
Binder\InSubmissionClassBinder.cs (1)
62internal override ImmutableArray<AliasAndUsingDirective> UsingAliases => ((SourceNamespaceSymbol)Compilation.SourceModule.GlobalNamespace).GetUsingAliases(_declarationSyntax, basesBeingResolved: null);
Binder\WithExternAliasesBinder.cs (2)
38ImmutableDictionary<string, AliasAndUsingDirective>.Empty, 56ImmutableDictionary<string, AliasAndUsingDirective>.Empty,
Binder\WithExternAndUsingAliasesBinder.cs (11)
32internal abstract override ImmutableArray<AliasAndUsingDirective> UsingAliases { get; } 34protected abstract ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved); 103internal static WithExternAndUsingAliasesBinder Create(ImmutableArray<AliasAndExternAliasDirective> externAliases, ImmutableDictionary<string, AliasAndUsingDirective> usingAliases, WithUsingNamespacesAndTypesBinder next) 113private ImmutableArray<AliasAndUsingDirective> _lazyUsingAliases; 114private ImmutableDictionary<string, AliasAndUsingDirective>? _lazyUsingAliasesMap; 138internal override ImmutableArray<AliasAndUsingDirective> UsingAliases 151protected override ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved) 229private readonly ImmutableDictionary<string, AliasAndUsingDirective> _usingAliases; 231internal FromSymbols(ImmutableArray<AliasAndExternAliasDirective> externAliases, ImmutableDictionary<string, AliasAndUsingDirective> usingAliases, WithUsingNamespacesAndTypesBinder next) 247internal override ImmutableArray<AliasAndUsingDirective> UsingAliases 255protected override ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved)
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
352return Imports.Create(ImmutableDictionary<string, AliasAndUsingDirective>.Empty, _usings, ImmutableArray<AliasAndExternAliasDirective>.Empty);
Compilation\SyntaxTreeSemanticModel.cs (1)
1934foreach (var alias in usingAliases)
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (29)
143public ImmutableArray<AliasAndUsingDirective> GetUsingAliases(CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 153return ImmutableArray<AliasAndUsingDirective>.Empty; 163return ImmutableArray<AliasAndUsingDirective>.Empty; 174public ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 195return ImmutableDictionary<string, AliasAndUsingDirective>.Empty; 243private ImmutableDictionary<string, AliasAndUsingDirective> GetGlobalUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved) 263ImmutableDictionary<string, AliasAndUsingDirective>? mergedAliases = null; 356var globalAliasesMap = ImmutableDictionary<string, AliasAndUsingDirective>.Empty; 380UsingAliasesMap = mergedAliases ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty, 510internal ImmutableArray<AliasAndUsingDirective> GetUsingAliases(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 515internal ImmutableArray<AliasAndUsingDirective> GetGlobalUsingAliases(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 520internal ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 522return GetUsingsAndDiagnostics(declaringSymbol, declarationSyntax, basesBeingResolved).UsingAliasesMap ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty; 525internal ImmutableDictionary<string, AliasAndUsingDirective> GetGlobalUsingAliasesMap(SourceNamespaceSymbol declaringSymbol, SyntaxReference declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 527return (_lazyGlobalUsings ?? GetGlobalUsingsAndDiagnostics(declaringSymbol, (CSharpSyntaxNode)declarationSyntax.GetSyntax(), basesBeingResolved)).UsingAliasesMap ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty; 599Debug.Assert((calculated.UsingAliasesMap ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty).SetEquals(result.UsingAliasesMap ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty)); 624var globalUsingAliasesMap = ImmutableDictionary<string, AliasAndUsingDirective>.Empty; 626var globalUsingAliases = ImmutableArray<AliasAndUsingDirective>.Empty; 641ImmutableDictionary<string, AliasAndUsingDirective>.Builder? usingAliasesMap = null; 642ArrayBuilder<AliasAndUsingDirective>? usingAliases = null; 707var aliasAndDirective = new AliasAndUsingDirective(new AliasSymbolFromSyntax(declaringSymbol, usingDirective), usingDirective); 711usingAliases = ArrayBuilder<AliasAndUsingDirective>.GetInstance(); 1097UsingAliases = ImmutableArray<AliasAndUsingDirective>.Empty, 1103public ImmutableArray<AliasAndUsingDirective> UsingAliases { get; init; } 1104public ImmutableDictionary<string, AliasAndUsingDirective>? UsingAliasesMap { get; init; } 1122UsingAliasesMap = ImmutableDictionary<string, AliasAndUsingDirective>.Empty, 1128public ImmutableDictionary<string, AliasAndUsingDirective>? UsingAliasesMap { get; init; } 1139Imports.Create(UsingAliasesMap ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty,