2 implementations of IAliasSymbol
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\AliasSymbol.cs (1)
9internal sealed class AliasSymbol : Symbol, IAliasSymbol
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\AliasSymbol.vb (1)
54Implements IAliasSymbol
283 references to IAliasSymbol
Microsoft.CodeAnalysis (21)
Compilation\Compilation.cs (1)
1719s = ((IAliasSymbol)s).Target;
Compilation\Extensions.cs (2)
68public static IAliasSymbol? GetAliasInfo(this SemanticModel semanticModel, SyntaxNode nameSyntax, CancellationToken cancellationToken = default(CancellationToken)) 90public static IAliasSymbol? GetSpeculativeAliasInfo(this SemanticModel semanticModel, int position, SyntaxNode nameSyntax, SpeculativeBindingOption bindingOption)
Compilation\IImportScope.cs (8)
12/// reference to the location the import directive was declared at. For the <see cref="IAliasSymbol"/> import, the 14/// cref="ISymbol.DeclaringSyntaxReferences"/> on the <see cref="IAliasSymbol"/> itself. For <see cref="Imports"/> 50ImmutableArray<IAliasSymbol> Aliases { get; } 57ImmutableArray<IAliasSymbol> ExternAliases { get; } 127ImmutableArray<IAliasSymbol> aliases, 128ImmutableArray<IAliasSymbol> externAliases, 146public ImmutableArray<IAliasSymbol> Aliases { get; } 147public ImmutableArray<IAliasSymbol> ExternAliases { get; }
Compilation\SemanticModel.cs (4)
225internal IAliasSymbol? GetAliasInfo(SyntaxNode nameSyntax, CancellationToken cancellationToken = default(CancellationToken)) 237protected abstract IAliasSymbol? GetAliasInfoCore(SyntaxNode nameSyntax, CancellationToken cancellationToken = default(CancellationToken)); 300internal IAliasSymbol? GetSpeculativeAliasInfo(int position, SyntaxNode nameSyntax, SpeculativeBindingOption bindingOption) 321protected abstract IAliasSymbol? GetSpeculativeAliasInfoCore(int position, SyntaxNode nameSyntax, SpeculativeBindingOption bindingOption);
DocumentationCommentId.cs (1)
567public override bool VisitAlias(IAliasSymbol symbol)
SymbolDisplay\AbstractSymbolDisplayVisitor_Minimal.cs (2)
123var aliasSymbol = symbol as IAliasSymbol;
Symbols\SymbolVisitor.cs (1)
18public virtual void VisitAlias(IAliasSymbol symbol)
Symbols\SymbolVisitor`1.cs (1)
21public virtual TResult? VisitAlias(IAliasSymbol symbol)
Symbols\SymbolVisitor`2.cs (1)
26public virtual TResult VisitAlias(IAliasSymbol symbol, TArgument argument)
Microsoft.CodeAnalysis.CodeStyle (17)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
541var namespaceOrType = symbol is IAliasSymbol alias ? alias.Target : symbol as INamespaceOrTypeSymbol; 631IAliasSymbol aliasSymbol => aliasSymbol.Target as ITypeSymbol,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.RequiresUnsafeModifierVisitor.cs (1)
139public override bool VisitAlias(IAliasSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
96return IsSymbolAccessibleCore(((IAliasSymbol)symbol).Target, within, throughType, out failedThroughTypeCheck);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.MinimalAccessibilityVisitor.cs (1)
18public override Accessibility VisitAlias(IAliasSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AliasSymbolKey.cs (4)
14private sealed class AliasSymbolKey : AbstractSymbolKey<IAliasSymbol> 18public sealed override void Create(IAliasSymbol symbol, SymbolKeyWriter visitor) 26SymbolKeyReader reader, IAliasSymbol? contextualSymbol, out string? failureReason) 69if (symbol is IAliasSymbol aliasSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
326public override void VisitAlias(IAliasSymbol aliasSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (5)
15using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 31out IAliasSymbol? aliasSymbol) 49public static void AddAliasSymbols(SemanticModel semanticModel, int namespaceId, IEnumerable<IAliasSymbol> aliasSymbols) 59var builder = ImmutableDictionary.CreateBuilder<INamespaceOrTypeSymbol, IAliasSymbol>(); 60foreach (var alias in aliasSymbols)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.cs (2)
175=> symbol.IsKind(SymbolKind.Alias, out IAliasSymbol? alias) ? alias.Target : symbol; 182symbol = ((IAliasSymbol)symbol).Target;
Microsoft.CodeAnalysis.CSharp (36)
Compilation\CSharpSemanticModel.cs (8)
1168public IAliasSymbol GetAliasInfo(IdentifierNameSyntax nameSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1176return info.Symbol as IAliasSymbol; 1195public IAliasSymbol GetSpeculativeAliasInfo(int position, IdentifierNameSyntax nameSyntax, SpeculativeBindingOption bindingOption) 1211return symbolInfo.Symbol as IAliasSymbol; 3197public abstract IAliasSymbol GetDeclaredSymbol(UsingDirectiveSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)); 3205public abstract IAliasSymbol GetDeclaredSymbol(ExternAliasDirectiveSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)); 5047protected sealed override IAliasSymbol GetSpeculativeAliasInfoCore(int position, SyntaxNode nameSyntax, SpeculativeBindingOption bindingOption) 5064protected sealed override IAliasSymbol GetAliasInfoCore(SyntaxNode node, CancellationToken cancellationToken)
Compilation\MemberSemanticModel.cs (2)
802public override IAliasSymbol GetDeclaredSymbol(UsingDirectiveSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 808public override IAliasSymbol GetDeclaredSymbol(ExternAliasDirectiveSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SpeculativeSemanticModelWithMemberModel.cs (2)
355public override IAliasSymbol GetDeclaredSymbol(UsingDirectiveSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 360public override IAliasSymbol GetDeclaredSymbol(ExternAliasDirectiveSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SpeculativeSyntaxTreeSemanticModel.cs (1)
123var aliasSymbol = _parentSemanticModel.GetSpeculativeAliasInfo(_position, expression, this.GetSpeculativeBindingOption(expression));
Compilation\SyntaxTreeSemanticModel.cs (2)
1915public override IAliasSymbol GetDeclaredSymbol( 1955public override IAliasSymbol GetDeclaredSymbol(ExternAliasDirectiveSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
CSharpExtensions.cs (4)
1028public static IAliasSymbol? GetAliasInfo(this SemanticModel? semanticModel, IdentifierNameSyntax nameSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1038public static IAliasSymbol? GetSpeculativeAliasInfo(this SemanticModel? semanticModel, int position, IdentifierNameSyntax nameSyntax, SpeculativeBindingOption bindingOption) 1544public static IAliasSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, UsingDirectiveSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1553public static IAliasSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, ExternAliasDirectiveSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
SymbolDisplay\SymbolDisplayVisitor.cs (3)
23private IDictionary<INamespaceOrTypeSymbol, IAliasSymbol>? _lazyAliasMap; 47IDictionary<INamespaceOrTypeSymbol, IAliasSymbol>? aliasMap, 332public override void VisitAlias(IAliasSymbol symbol)
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (10)
22var alias = GetAliasSymbol(symbol); 36var boundAlias = boundSymbols[0] as IAliasSymbol; 171private IDictionary<INamespaceOrTypeSymbol, IAliasSymbol> CreateAliasMap() 175return SpecializedCollections.EmptyDictionary<INamespaceOrTypeSymbol, IAliasSymbol>(); 213var builder = ImmutableDictionary.CreateBuilder<INamespaceOrTypeSymbol, IAliasSymbol>(); 224&& semanticModel.GetDeclaredSymbol(u) is IAliasSymbol aliasSymbol 304private IDictionary<INamespaceOrTypeSymbol, IAliasSymbol> AliasMap 319private IAliasSymbol? GetAliasSymbol(INamespaceOrTypeSymbol symbol) 321IAliasSymbol? result;
Symbols\PublicModel\AliasSymbol.cs (1)
21INamespaceOrTypeSymbol IAliasSymbol.Target
Symbols\SymbolExtensions.cs (3)
647internal static IAliasSymbol? GetPublicSymbol(this AliasSymbol? symbol) 649return symbol.GetPublicSymbol<IAliasSymbol>(); 790internal static AliasSymbol? GetSymbol(this IAliasSymbol? symbol)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamespaceGenerator.cs (1)
152if (symbol is IAliasSymbol alias)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
3048var target = ((IAliasSymbol)symbol).Target;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
47public override TypeSyntax VisitAlias(IAliasSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
48? ((IAliasSymbol)firstSymbol).Target
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenDeconstructTests.cs (3)
3804var x1Alias = model.GetAliasInfo(x1Type); 5820var x1Alias = model.GetAliasInfo(x1Type); 5828var x3Alias = model.GetAliasInfo(x3Type);
CodeGen\CodeGenRefLocalTests.cs (1)
4077var alias = model.GetAliasInfo(type);
Microsoft.CodeAnalysis.CSharp.Features (6)
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (2)
39public readonly IAliasSymbol? Alias = alias; 373var alias = semanticModel.GetAliasInfo(conditionalExpressionSyntax.Condition, cancellationToken);
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.NameGenerator.cs (1)
32internal static ImmutableArray<Words> GetBaseNames(IAliasSymbol alias)
Completion\CompletionProviders\ObjectCreationCompletionProvider.cs (1)
81if (symbol is IAliasSymbol)
Completion\CompletionProviders\SymbolCompletionProvider.cs (1)
257else if (symbol.IsKind(SymbolKind.NamedType) || symbol is IAliasSymbol aliasSymbol && aliasSymbol.Target.IsType)
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.cs (1)
99foreach (var alias in scope.Aliases)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (12)
Semantics\AccessCheckTests.cs (3)
743IAliasSymbol aliasA = model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<UsingDirectiveSyntax>().Where(u => u.Alias != null).Single()) as IAliasSymbol; 897IAliasSymbol SomeAlias = model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<UsingDirectiveSyntax>().Where(u => u.Alias != null).Single());
Semantics\ColorColorTests.cs (1)
593var alias = model.GetAliasInfo(expr);
Semantics\GlobalUsingDirectiveTests.cs (2)
3847var ext1 = model.GetDeclaredSymbol(ext[0]); 3848var ext2 = model.GetDeclaredSymbol(ext[1]);
Semantics\InteractiveUsingTests.cs (4)
89var aliasSymbol = model.GetDeclaredSymbol(syntax); 91Assert.Equal(typeSymbol, ((IAliasSymbol)aliasSymbol).Target); 119var aliasSymbol = model.GetDeclaredSymbol(syntax); 121Assert.Equal(typeSymbol, ((IAliasSymbol)aliasSymbol).Target);
Semantics\LookupTests.cs (2)
1538var aliasY = (IAliasSymbol)actual_lookupSymbols.Where((sym) => sym.Name.Equals("aliasY") && sym.Kind == SymbolKind.Alias).Single();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (49)
Compilation\SemanticModelAPITests.cs (12)
1234var symbol = model.GetDeclaredSymbol(aliasSyntax); 1269var aliasSymbol = model.GetDeclaredSymbol(aliasSyntax); 1308var aliasSymbol = model.GetDeclaredSymbol(aliasSyntax); 1730var aliasSymbol = model.GetDeclaredSymbol(aliasDecl); 1749var fieldTypeAliasInfo = model.GetAliasInfo(typeSyntax); 2902var symbol = speculativeModel.GetAliasInfo(speculatedAliasName); 3852var target = (INamespaceSymbol)((IAliasSymbol)symbol).Target; 4601var alias1 = getGlobalAlias(CreateCompilation(text)); 4602var alias2 = getGlobalAlias(CreateCompilation(text)); 4608static IAliasSymbol getGlobalAlias(CSharpCompilation compilation) 4627var alias1 = model.GetAliasInfo(nodes[0]); 4628var alias2 = model.GetAliasInfo(nodes[1]);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (11)
3868var alias1 = modelWeakReference.UseReference(sm => sm.GetAliasInfo(node)); 3875var alias2 = model2.GetAliasInfo(node); 3926var alias1 = model.GetDeclaredSymbol(usingDirectives[0]); 3930var alias2 = model.GetDeclaredSymbol(usingDirectives[1]); 3937var alias1b = model.GetDeclaredSymbol(usingDirectives[0]); 3941var alias2b = model.GetDeclaredSymbol(usingDirectives[1]); 4294var aliasSymbol = speculativeModel.GetAliasInfo(attr3.Name as IdentifierNameSyntax); 4541var alias = (IAliasSymbol)symbols.Single(); 4578var alias = (IAliasSymbol)symbols.Single();
Compilation\SymbolVisitorTests.cs (2)
44public override void VisitAlias(IAliasSymbol symbol) 213public override string VisitAlias(IAliasSymbol symbol)
DocumentationComments\CrefTests.cs (2)
6216var alias = model.GetAliasInfo(crefSyntax.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().Single()); 6249var alias = model.GetAliasInfo(parameterSyntax);
DocumentationComments\DocumentationCommentIDTests.cs (1)
32var symbol = model.GetDeclaredSymbol(syntax);
Symbols\Source\ExternAliasTests.cs (5)
362var alias1 = model.GetAliasInfo(qualifier); 410var aliasSymbol = model.GetDeclaredSymbol(aliasSyntax); 436var aliasSymbol = model.GetDeclaredSymbol(aliasSyntax); 488var externAliasSymbol = model.GetDeclaredSymbol(externAliasSyntax); 494var usingAliasSymbol = model.GetDeclaredSymbol(usingSyntax);
Symbols\Source\FileModifierTests.cs (1)
3985var aliasInfo = model.GetAliasInfo(methodNameSyntax);
Symbols\Source\UsingAliasTests.cs (15)
50var alias1 = model.GetAliasInfo((IdentifierNameSyntax)base1); 72var alias4 = model.GetAliasInfo((IdentifierNameSyntax)base4); 110var alias1 = model.GetAliasInfo((IdentifierNameSyntax)base1); 132var alias4 = model.GetAliasInfo((IdentifierNameSyntax)base4); 167var alias1 = model.GetAliasInfo((IdentifierNameSyntax)base1); 187var alias4 = model.GetAliasInfo((IdentifierNameSyntax)base4); 225var alias1 = model.GetAliasInfo((IdentifierNameSyntax)base1); 245var alias4 = model.GetAliasInfo((IdentifierNameSyntax)base4); 278var alias = model.GetDeclaredSymbol(usingAlias); 389var alias = model.GetDeclaredSymbol(usingAlias); 410var alias = model.GetDeclaredSymbol(usingAlias); 429var alias = model.GetDeclaredSymbol(usingAlias); 524var alias = comp.GetSemanticModel(syntaxTree).GetDeclaredSymbol(usingAlias); 703var alias = model.GetAliasInfo(node); 746var alias = model.GetAliasInfo(node);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
215public IAliasSymbol Alias;
Microsoft.CodeAnalysis.CSharp.Workspaces (19)
Recommendations\CSharpRecommendationServiceRunner.cs (2)
284var aliasSymbol = _context.SemanticModel.GetAliasInfo(alias, _cancellationToken); 786if (symbol is IAliasSymbol alias)
Rename\CSharpRenameRewriterLanguageService.cs (2)
62private readonly IAliasSymbol? _aliasSymbol; 145_aliasSymbol = _renamedSymbol as IAliasSymbol;
Simplification\CSharpSimplificationService.Expander.cs (1)
457var aliasInfo = _semanticModel.GetAliasInfo(originalSimpleName, _cancellationToken);
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (7)
74ISymbol symbol, CancellationToken cancellationToken, out IAliasSymbol aliasReplacement) 123var aliasTypeInfo = semanticModel.GetSpeculativeAliasInfo(node.SpanStart, aliasIdentifier, SpeculativeBindingOption.BindAsTypeOrNamespace); 257private static bool ValidateAliasForTarget(IAliasSymbol aliasReplacement, SemanticModel semanticModel, ExpressionSyntax node, ISymbol symbol) 301if (boundSymbols[0] is IAliasSymbol && aliasReplacement.Target.Equals(symbol)) 310private static IAliasSymbol GetAliasForSymbol(INamespaceOrTypeSymbol symbol, SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 320if (!AliasSymbolCache.TryGetAliasSymbol(originalSemanticModel, namespaceId.Value, symbol, out var aliasSymbol)) 324originalSemanticModel, namespaceId.Value, semanticModel.LookupNamespacesAndTypes(token.SpanStart).OfType<IAliasSymbol>());
Simplification\Simplifiers\ExpressionSimplifier.cs (1)
140cancellationToken, out var aliasReplacement))
Simplification\Simplifiers\NameSimplifier.cs (2)
116if (TryReplaceExpressionWithAlias(name, semanticModel, symbol, cancellationToken, out var aliasReplacement)) 232var aliasInfo = semanticModel.GetAliasInfo(name, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamespaceGenerator.cs (1)
152if (symbol is IAliasSymbol alias)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
3048var target = ((IAliasSymbol)symbol).Target;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
47public override TypeSyntax VisitAlias(IAliasSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
48? ((IAliasSymbol)firstSymbol).Target
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
AbstractTypeParameterChecker.cs (1)
44public sealed override void VisitAlias(IAliasSymbol symbol)
Microsoft.CodeAnalysis.Features (11)
Common\TaggedText.cs (1)
110if (part is { Symbol: IAliasSymbol alias, Kind: SymbolDisplayPartKind.AliasName })
Completion\Providers\ImportCompletionProvider\AbstractExtensionMethodImportCompletionProvider.cs (1)
110IAliasSymbol aliasSymbol => aliasSymbol.Target as ITypeSymbol,
DocumentHighlighting\AbstractDocumentHighlightsService.cs (1)
169references = references.FilterToAliasMatches(symbol as IAliasSymbol);
GoToDefinition\GoToDefinitionFeatureHelpers.cs (2)
24var alias = symbol as IAliasSymbol;
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (1)
21public override void VisitAlias(IAliasSymbol symbol)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
363else if (symbol is IAliasSymbol alias)
QuickInfo\CommonSemanticQuickInfoProvider.ErrorVisitor.cs (1)
23public override bool VisitAlias(IAliasSymbol symbol)
Rename\SymbolicRenameInfo.cs (1)
78if (this.Symbol.IsAttribute() || (this.Symbol is IAliasSymbol alias && alias.Target.IsAttribute()))
Shared\Extensions\ISymbolExtensions_2.cs (2)
23return ((IAliasSymbol)symbol).Target.GetGlyph(); 199IAliasSymbol alias => alias.Target.GetDocumentationComment(compilation, expandIncludes: true, expandInheritdoc: true, cancellationToken: cancellationToken),
Microsoft.CodeAnalysis.VisualBasic (24)
Binding\ImportAliasesBinder.vb (2)
44Public Function GetImportChainData() As ImmutableArray(Of IAliasSymbol) 45Return ImmutableArray(Of IAliasSymbol).CastUp(_importedAliases.SelectAsArray(Function(kvp) kvp.Value.Alias))
Binding\MemberSemanticModel.vb (1)
548Public Overloads Overrides Function GetDeclaredSymbol(declarationSyntax As SimpleImportsClauseSyntax, Optional cancellationToken As CancellationToken = Nothing) As IAliasSymbol
Compilation\SemanticModel.vb (9)
501Public Shadows Function GetAliasInfo(nameSyntax As IdentifierNameSyntax, Optional cancellationToken As CancellationToken = Nothing) As IAliasSymbol 506Return TryCast(info.Symbol, IAliasSymbol) 528Public Shadows Function GetSpeculativeAliasInfo(position As Integer, nameSyntax As IdentifierNameSyntax, bindingOption As SpeculativeBindingOption) As IAliasSymbol 534Return TryCast(info.Symbol, IAliasSymbol) 2738Public MustOverride Overloads Function GetDeclaredSymbol(declarationSyntax As SimpleImportsClauseSyntax, Optional cancellationToken As CancellationToken = Nothing) As IAliasSymbol 3176Protected NotOverridable Overrides Function GetSpeculativeAliasInfoCore(position As Integer, nameSyntax As SyntaxNode, bindingOption As SpeculativeBindingOption) As IAliasSymbol 3190Protected NotOverridable Overrides Function GetAliasInfoCore(node As SyntaxNode, Optional cancellationToken As CancellationToken = Nothing) As IAliasSymbol 3501Dim aliases = If(importAliases?.GetImportChainData(), ImmutableArray(Of IAliasSymbol).Empty) 3508scopes.Add(New SimpleImportScope(aliases, ExternAliases:=ImmutableArray(Of IAliasSymbol).Empty, [imports], xmlNamespaces))
Compilation\SpeculativeSemanticModelWithMemberModel.vb (1)
173Public Overloads Overrides Function GetDeclaredSymbol(declarationSyntax As SimpleImportsClauseSyntax, Optional cancellationToken As CancellationToken = Nothing) As IAliasSymbol
Compilation\SyntaxTreeSemanticModel.vb (1)
1305Public Overloads Overrides Function GetDeclaredSymbol(declarationSyntax As SimpleImportsClauseSyntax, Optional cancellationToken As CancellationToken = Nothing) As IAliasSymbol
SymbolDisplay\SymbolDisplayVisitor.vb (1)
189Public Overrides Sub VisitAlias(symbol As IAliasSymbol)
SymbolDisplay\SymbolDisplayVisitor_Minimal.vb (2)
137Dim boundAlias = TryCast(boundSymbols(0), IAliasSymbol) 148Private Function GetAliasSymbol(symbol As INamespaceOrTypeSymbol) As IAliasSymbol
Symbols\AliasSymbol.vb (1)
109Private ReadOnly Property IAliasSymbol_Target As INamespaceOrTypeSymbol Implements IAliasSymbol.Target
VisualBasicExtensions.vb (6)
740Public Function AliasImports(compilation As Compilation) As ImmutableArray(Of IAliasSymbol) 743Return StaticCast(Of IAliasSymbol).From(vbcomp.AliasImports) 745Return ImmutableArray.Create(Of IAliasSymbol)() 1227Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As SimpleImportsClauseSyntax, Optional cancellationToken As CancellationToken = Nothing) As IAliasSymbol 1567Public Function GetAliasInfo(semanticModel As SemanticModel, nameSyntax As IdentifierNameSyntax, Optional cancellationToken As CancellationToken = Nothing) As IAliasSymbol 1581Public Function GetSpeculativeAliasInfo(semanticModel As SemanticModel, position As Integer, nameSyntax As IdentifierNameSyntax, bindingOption As SpeculativeBindingOption) As IAliasSymbol
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (2)
86Public Function GetAliasInfo(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As IAliasSymbol 168Public Iterator Function GetAliasSymbols(semanticModel As SemanticModel) As IEnumerable(Of IAliasSymbol)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (6)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamespaceGenerator.vb (2)
107If TypeOf import Is IAliasSymbol Then 108Dim [alias] = DirectCast(import, IAliasSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (1)
802Dim target = DirectCast(symbol, IAliasSymbol).Target
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\INamespaceOrTypeSymbolExtensions.vb (2)
19Public Function GetAliasForSymbol(symbol As INamespaceOrTypeSymbol, node As SyntaxNode, semanticModel As SemanticModel) As IAliasSymbol 31Dim aliasSymbol As IAliasSymbol = Nothing
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (1)
37Public Overrides Function VisitAlias(symbol As IAliasSymbol) As TypeSyntax
Microsoft.CodeAnalysis.VisualBasic.Features (1)
Completion\CompletionProviders\ImplementsClauseCompletionProvider.vb (1)
114symbol = DirectCast(symbol, IAliasSymbol).Target
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\GetImportScopesTests.vb (2)
47Private Shared Function IsAliasWithName(symbol As IAliasSymbol, aliasName As String, targetName As String, inGlobalNamespace As Boolean) As Boolean 58Private Shared Function IsAliasImportsClauseWithName(aliasSymbol As IAliasSymbol, name As String) As Boolean
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
CompilationTestUtils.vb (1)
532Public [Alias] As IAliasSymbol = Nothing
Microsoft.CodeAnalysis.VisualBasic.Workspaces (20)
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (2)
168(TypeOf symbol Is IAliasSymbol AndAlso TypeOf DirectCast(symbol, IAliasSymbol).Target Is INamespaceOrTypeSymbol) OrElse
Recommendations\VisualBasicRecommendationServiceRunner.vb (3)
237firstSymbol = DirectCast(firstSymbol, IAliasSymbol).Target 450symbol = DirectCast(symbol, IAliasSymbol).Target 491symbol = DirectCast(symbol, IAliasSymbol).Target
Rename\VisualBasicRenameRewriterLanguageService.vb (2)
50Private ReadOnly _aliasSymbol As IAliasSymbol 122_aliasSymbol = TryCast(_renamedSymbol, IAliasSymbol)
Simplification\Simplifiers\AbstractVisualBasicSimplifier.vb (3)
63<Out> ByRef aliasReplacement As IAliasSymbol) As Boolean 150Private Shared Function ValidateAliasForTarget(aliasReplacement As IAliasSymbol, semanticModel As SemanticModel, node As ExpressionSyntax, symbol As ISymbol) As Boolean 169Dim boundAlias = TryCast(boundSymbols(0), IAliasSymbol)
Simplification\Simplifiers\ExpressionSimplifier.vb (1)
108Dim aliasReplacement As IAliasSymbol = Nothing
Simplification\Simplifiers\NameSimplifier.vb (1)
74Dim aliasReplacement As IAliasSymbol = Nothing
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (2)
86Public Function GetAliasInfo(semanticModel As SemanticModel, expression As ExpressionSyntax, cancellationToken As CancellationToken) As IAliasSymbol 168Public Iterator Function GetAliasSymbols(semanticModel As SemanticModel) As IEnumerable(Of IAliasSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamespaceGenerator.vb (2)
107If TypeOf import Is IAliasSymbol Then 108Dim [alias] = DirectCast(import, IAliasSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (1)
802Dim target = DirectCast(symbol, IAliasSymbol).Target
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\INamespaceOrTypeSymbolExtensions.vb (2)
19Public Function GetAliasForSymbol(symbol As INamespaceOrTypeSymbol, node As SyntaxNode, semanticModel As SemanticModel) As IAliasSymbol 31Dim aliasSymbol As IAliasSymbol = Nothing
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (1)
37Public Overrides Function VisitAlias(symbol As IAliasSymbol) As TypeSyntax
Microsoft.CodeAnalysis.Workspaces (41)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (9)
216private static IAliasSymbol? GetAliasSymbol( 232if (state.SemanticModel.GetDeclaredSymbol(directive, cancellationToken) is IAliasSymbol aliasSymbol && 267private static ImmutableArray<IAliasSymbol> GetLocalAliasSymbols( 272using var aliasSymbols = TemporaryArray<IAliasSymbol>.Empty; 275var symbol = GetAliasSymbol(state, reference.Node, cancellationToken); 286ImmutableArray<IAliasSymbol> localAliasSymbols, 291foreach (var localAliasSymbol in localAliasSymbols) 308ImmutableArray<IAliasSymbol> localAliasSymbols, 313foreach (var aliasSymbol in localAliasSymbols)
FindSymbols\FindReferences\FindReferenceCache.cs (1)
95public IAliasSymbol? GetAliasInfo(
FindSymbols\FindReferences\FindReferencesSearchEngine.SymbolSet.cs (1)
111if (searchSymbol is IAliasSymbol aliasSymbol)
FindSymbols\ReferenceLocation.cs (4)
27public IAliasSymbol? Alias { get; } 68IAliasSymbol? alias, 89internal ReferenceLocation(Document document, IAliasSymbol? alias, Location location, bool isImplicit, SymbolUsageInfo symbolUsageInfo, ImmutableArray<(string key, string value)> additionalProperties, CandidateReason candidateReason) 116EqualityComparer<IAliasSymbol>.Default.Equals(this.Alias, other.Alias) &&
ObsoleteSymbol\AbstractObsoleteSymbolService.cs (1)
194if (symbol is IAliasSymbol alias)
Recommendations\AbstractRecommendationServiceRunner.cs (2)
302var aliases = semanticModel.LookupSymbols(_context.Position, container).OfType<IAliasSymbol>().Where(a => systemNamespace.Equals(a.Target)); 327var aliases = _context.SemanticModel.LookupSymbols(_context.Position, container).OfType<IAliasSymbol>().Where(a => specialTypeSymbol.Equals(a.Target));
Remote\RemoteArguments.cs (1)
52IAliasSymbol? alias, Document document, CancellationToken cancellationToken)
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
77var target = ((IAliasSymbol)originalSymbol).Target;
Shared\Extensions\IFindReferencesResultExtensions.cs (1)
98IAliasSymbol? aliasSymbol)
Shared\Extensions\SemanticModelExtensions.cs (1)
86IAliasSymbol? aliasSymbol = null;
Shared\Extensions\TokenSemanticInfo.cs (2)
17IAliasSymbol aliasSymbol, 28public readonly IAliasSymbol AliasSymbol = aliasSymbol;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
541var namespaceOrType = symbol is IAliasSymbol alias ? alias.Target : symbol as INamespaceOrTypeSymbol; 631IAliasSymbol aliasSymbol => aliasSymbol.Target as ITypeSymbol,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.RequiresUnsafeModifierVisitor.cs (1)
139public override bool VisitAlias(IAliasSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
96return IsSymbolAccessibleCore(((IAliasSymbol)symbol).Target, within, throughType, out failedThroughTypeCheck);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.MinimalAccessibilityVisitor.cs (1)
18public override Accessibility VisitAlias(IAliasSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AliasSymbolKey.cs (4)
14private sealed class AliasSymbolKey : AbstractSymbolKey<IAliasSymbol> 18public sealed override void Create(IAliasSymbol symbol, SymbolKeyWriter visitor) 26SymbolKeyReader reader, IAliasSymbol? contextualSymbol, out string? failureReason) 69if (symbol is IAliasSymbol aliasSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
326public override void VisitAlias(IAliasSymbol aliasSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (5)
15using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 31out IAliasSymbol? aliasSymbol) 49public static void AddAliasSymbols(SemanticModel semanticModel, int namespaceId, IEnumerable<IAliasSymbol> aliasSymbols) 59var builder = ImmutableDictionary.CreateBuilder<INamespaceOrTypeSymbol, IAliasSymbol>(); 60foreach (var alias in aliasSymbols)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.cs (2)
175=> symbol.IsKind(SymbolKind.Alias, out IAliasSymbol? alias) ? alias.Target : symbol; 182symbol = ((IAliasSymbol)symbol).Target;
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SymbolKeyTests.cs (1)
682Assert.True(symbols[0] is IAliasSymbol);
Microsoft.VisualStudio.LanguageServices (1)
Library\VsNavInfo\NavInfoFactory.cs (1)
40case IAliasSymbol aliasSymbol:
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\MethodXml\MethodXmlBuilder.cs (1)
491leftHandSymbol = ((IAliasSymbol)leftHandSymbol).Target;
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
GlyphExtensionsTests.cs (1)
220var aliasMock = symbolMock.As<IAliasSymbol>();
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
CodeModel\MethodXML\MethodXmlBuilder.vb (1)
366leftHandSymbol = DirectCast(leftHandSymbol, IAliasSymbol).Target