1 interface inheriting from IAssemblySymbol
Microsoft.CodeAnalysis (1)
Symbols\ISourceAssemblySymbol.cs (1)
14public interface ISourceAssemblySymbol : IAssemblySymbol
2 implementations of IAssemblySymbol
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\AssemblySymbol.cs (1)
20internal abstract class AssemblySymbol : Symbol, IAssemblySymbol
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\AssemblySymbol.vb (1)
23Implements IAssemblySymbol, IAssemblySymbolInternal
365 references to IAssemblySymbol
Microsoft.CodeAnalysis (25)
Compilation\Compilation.cs (13)
864/// Gets the <see cref="IAssemblySymbol"/> or <see cref="IModuleSymbol"/> for a metadata reference used to create this 882public MetadataReference? GetMetadataReference(IAssemblySymbol assemblySymbol) 887private protected abstract MetadataReference? CommonGetMetadataReference(IAssemblySymbol assemblySymbol); 903/// The <see cref="IAssemblySymbol"/> that represents the assembly being created. 905public IAssemblySymbol Assembly { get { return CommonAssembly; } } 906protected abstract IAssemblySymbol CommonAssembly { get; } 1230var corLib = ObjectType.ContainingAssembly; 1237foreach (var referencedAssembly in SourceModule.ReferencedAssemblySymbols) 1581/// compilation. <paramref name="within"/> is required to be an <see cref="INamedTypeSymbol"/> or <see cref="IAssemblySymbol"/>. 1609if (!(within is INamedTypeSymbol || within is IAssemblySymbol)) 1631bool assemblyIsInReferences(IAssemblySymbol a) 1655bool assemblyIsInCompilationReferences(IAssemblySymbol a, Compilation compilation) 1680return assemblyIsInReferences((IAssemblySymbol)s);
DeclarationComputer.cs (1)
56var assemblyToScope = model.Compilation.Assembly;
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (1)
309Debug.Assert(symbol is IAssemblySymbol || symbol is IModuleSymbol);
PEWriter\MetadataWriter.PortablePdb.cs (1)
968var peReader = pair.AssemblySymbol.GetISymbol() is IAssemblySymbol assemblySymbol
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithMetadataName.cs (1)
148if (symbol is IAssemblySymbol assemblySymbol)
Symbols\IAssemblySymbol.cs (1)
56bool GivesAccessTo(IAssemblySymbol toAssembly);
Symbols\IModuleSymbol.cs (1)
42ImmutableArray<IAssemblySymbol> ReferencedAssemblySymbols { get; }
Symbols\ISymbol.cs (2)
74/// Gets the <see cref="IAssemblySymbol"/> for the containing assembly. Returns null if the 77IAssemblySymbol ContainingAssembly { get; }
Symbols\ISymbolExtensions.cs (1)
104internal static bool IsNetModule(this IAssemblySymbol assembly) =>
Symbols\SymbolVisitor.cs (1)
28public virtual void VisitAssembly(IAssemblySymbol symbol)
Symbols\SymbolVisitor`1.cs (1)
31public virtual TResult? VisitAssembly(IAssemblySymbol symbol)
Symbols\SymbolVisitor`2.cs (1)
36public virtual TResult VisitAssembly(IAssemblySymbol symbol, TArgument argument)
Microsoft.CodeAnalysis.CodeStyle (48)
IAssemblySymbolExtensions.cs (7)
14this List<IAssemblySymbol> assemblies, 19foreach (var a in assemblies) 30public static bool ContainsTypeName(this List<IAssemblySymbol> assemblies, string typeName, bool tryWithAttributeSuffix = false) 36foreach (var a in assemblies) 47foreach (var a in assemblies) 60public static bool IsSameAssemblyOrHasFriendAccessTo(this IAssemblySymbol assembly, IAssemblySymbol toAssembly)
ICompilationExtensions.cs (2)
42public static ImmutableArray<IAssemblySymbol> GetReferencedAssemblySymbols(this Compilation compilation, bool excludePreviousSubmissions = false) 60var builder = ArrayBuilder<IAssemblySymbol>.GetInstance();
ISymbolExtensions.cs (1)
475[NotNullWhen(true)] this ISymbol? symbol, ISymbol withinType, IAssemblySymbol withinAssembly, CancellationToken cancellationToken)
ISymbolExtensions_Accessibility.cs (13)
21if (within is IAssemblySymbol assembly) 40IAssemblySymbol within, 90Debug.Assert(within is INamedTypeSymbol or IAssemblySymbol); 182Debug.Assert(within is INamedTypeSymbol or IAssemblySymbol); 216IAssemblySymbol assembly, 220Debug.Assert(within is INamedTypeSymbol or IAssemblySymbol); 222var withinAssembly = (within as IAssemblySymbol) ?? ((INamedTypeSymbol)within).ContainingAssembly; 257Debug.Assert(within is INamedTypeSymbol or IAssemblySymbol); 264var withinAssembly = (within as IAssemblySymbol) ?? ((INamedTypeSymbol)within).ContainingAssembly; 338IAssemblySymbol withinAssembly, 416Debug.Assert(within is INamedTypeSymbol or IAssemblySymbol);
SymbolEquivalenceComparer.AssemblyComparers.cs (5)
11private sealed class SimpleNameAssemblyComparer : IEqualityComparer<IAssemblySymbol?> 13public static readonly IEqualityComparer<IAssemblySymbol> Instance = new SimpleNameAssemblyComparer(); 15public bool Equals(IAssemblySymbol? x, IAssemblySymbol? y) 18public int GetHashCode(IAssemblySymbol? obj)
SymbolEquivalenceComparer.cs (2)
46private readonly IEqualityComparer<IAssemblySymbol>? _assemblyComparerOpt; 54IEqualityComparer<IAssemblySymbol>? assemblyComparerOpt,
SymbolEquivalenceComparer.EquivalenceVisitor.cs (4)
119SymbolKind.Assembly => AssembliesAreEquivalent((IAssemblySymbol)x, (IAssemblySymbol)y), 150private bool AssembliesAreEquivalent(IAssemblySymbol x, IAssemblySymbol y)
SymbolEquivalenceComparer.GetHashCodeVisitor.cs (2)
63SymbolKind.Assembly => CombineHashCodes((IAssemblySymbol)x, currentHash), 89private int CombineHashCodes(IAssemblySymbol x, int currentHash)
SymbolKey.AssemblySymbolKey.cs (5)
11private sealed class AssemblySymbolKey : AbstractSymbolKey<IAssemblySymbol> 15public sealed override void Create(IAssemblySymbol symbol, SymbolKeyWriter visitor) 23SymbolKeyReader reader, IAssemblySymbol? contextualSymbol, out string? failureReason) 29using var result = PooledArrayBuilder<IAssemblySymbol>.GetInstance(); 36foreach (var assembly in compilation.GetReferencedAssemblySymbols())
SymbolKey.cs (2)
27/// <item>Two <see cref="IAssemblySymbol"/>s are the "same" if 28/// they have equal <see cref="IAssemblySymbol.Identity"/>.Name</item>
SymbolKey.ModuleSymbolKey.cs (2)
28foreach (var assembly in containingSymbolResolution.OfType<IAssemblySymbol>())
SymbolKey.NamespaceSymbolKey.cs (1)
94case IAssemblySymbol assembly:
SymbolKey.SymbolKeyReader.cs (1)
717if (assemblyResolution.GetAnySymbol() is IAssemblySymbol assembly)
SymbolKey.SymbolKeyWriter.cs (1)
332public override void VisitAssembly(IAssemblySymbol assemblySymbol)
Microsoft.CodeAnalysis.CodeStyle.Fixes (8)
CodeGenerationAbstractNamedTypeSymbol.cs (1)
28IAssemblySymbol containingAssembly,
CodeGenerationNamedTypeSymbol.cs (1)
28IAssemblySymbol containingAssembly,
CodeGenerationNamespaceOrTypeSymbol.cs (1)
20IAssemblySymbol containingAssembly,
CodeGenerationSymbol.cs (2)
35IAssemblySymbol containingAssembly, 84public IAssemblySymbol ContainingAssembly { get; }
CodeGenerationSymbolFactory.cs (2)
427IAssemblySymbol? containingAssembly = null) 446IAssemblySymbol? containingAssembly = null)
CodeGenerationTypeSymbol.cs (1)
22IAssemblySymbol containingAssembly,
Microsoft.CodeAnalysis.CSharp (26)
Compilation\CSharpCompilation.cs (3)
1240public new MetadataReference? GetMetadataReference(IAssemblySymbol assemblySymbol) 1245private protected override MetadataReference? CommonGetMetadataReference(IAssemblySymbol assemblySymbol) 3617protected override IAssemblySymbol CommonAssembly
SymbolDisplay\SymbolDisplayVisitor.cs (1)
100public override void VisitAssembly(IAssemblySymbol symbol)
Symbols\PublicModel\AssemblySymbol.cs (13)
24INamespaceSymbol IAssemblySymbol.GlobalNamespace 32IEnumerable<IModuleSymbol> IAssemblySymbol.Modules 43bool IAssemblySymbol.IsInteractive => UnderlyingAssemblySymbol.IsInteractive; 45AssemblyIdentity IAssemblySymbol.Identity => UnderlyingAssemblySymbol.Identity; 47ICollection<string> IAssemblySymbol.TypeNames => UnderlyingAssemblySymbol.TypeNames; 49ICollection<string> IAssemblySymbol.NamespaceNames => UnderlyingAssemblySymbol.NamespaceNames; 51bool IAssemblySymbol.MightContainExtensionMethods => UnderlyingAssemblySymbol.MightContainExtensionMethods; 53AssemblyMetadata IAssemblySymbol.GetMetadata() => UnderlyingAssemblySymbol.GetMetadata(); 55INamedTypeSymbol IAssemblySymbol.ResolveForwardedType(string fullyQualifiedMetadataName) 60ImmutableArray<INamedTypeSymbol> IAssemblySymbol.GetForwardedTypes() 66bool IAssemblySymbol.GivesAccessTo(IAssemblySymbol assemblyWantingAccess) 102INamedTypeSymbol? IAssemblySymbol.GetTypeByMetadataName(string metadataName)
Symbols\PublicModel\ModuleSymbol.cs (1)
37ImmutableArray<IAssemblySymbol> IModuleSymbol.ReferencedAssemblySymbols
Symbols\PublicModel\PreprocessingSymbol.cs (1)
108IAssemblySymbol? ISymbol.ContainingAssembly => null;
Symbols\PublicModel\Symbol.cs (1)
205IAssemblySymbol ISymbol.ContainingAssembly => UnderlyingSymbol.ContainingAssembly.GetPublicSymbol();
Symbols\SymbolExtensions.cs (6)
396internal static AssemblySymbol? EnsureCSharpSymbolOrNull(this IAssemblySymbol? symbol, string paramName) 599internal static IAssemblySymbol? GetPublicSymbol(this AssemblySymbol? symbol) 601return symbol.GetPublicSymbol<IAssemblySymbol>(); 743internal static ImmutableArray<IAssemblySymbol> GetPublicSymbols(this ImmutableArray<AssemblySymbol> symbols) 745return GetPublicSymbols<IAssemblySymbol>(StaticCast<Symbol>.From(symbols)); 796internal static AssemblySymbol? GetSymbol(this IAssemblySymbol? symbol)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (8)
DecompiledSource\AssemblyResolver.cs (8)
27private readonly Dictionary<string, List<IAssemblySymbol>> _cache = new(); 39foreach (var reference in _parentCompilation.GetReferencedAssemblySymbols()) 43list = new List<IAssemblySymbol>(); 103IAssemblySymbol highestVersion = null; 104IAssemblySymbol exactMatch = null; 108foreach (var assembly in assemblies) 125var chosen = exactMatch ?? highestVersion; 129PEFile MakePEFile(IAssemblySymbol assembly)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
InteractiveSessionReferencesTests.cs (1)
154var missingB = m.ReferencedAssemblySymbols.Single(a => a.Name == "libA").Modules.Single().ReferencedAssemblySymbols.Single(a => a.Name == "libB");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\AccessCheckTests.cs (4)
738IAssemblySymbol sourceAssem = c.SourceModule.ContainingAssembly; 739IAssemblySymbol mscorlibAssem = ((CSharpCompilation)c).GetReferencedAssemblySymbol(c.ExternalReferences[0]).GetPublicSymbol(); 899IAssemblySymbol sourceAssem = c1.SourceModule.ContainingAssembly; 900IAssemblySymbol mscorlibAssem = ((CSharpCompilation)c1).GetReferencedAssemblySymbol(c1.ExternalReferences[0]).GetPublicSymbol();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (14)
Compilation\CompilationAPITests.cs (3)
2370var assembly = (IAssemblySymbol)vbComp.GetBoundReferenceManager().GetReferencedAssemblies().First().Value; 2374Assert.Null(comp.GetMetadataReference((IAssemblySymbol)null));
Compilation\SymbolVisitorTests.cs (9)
56public override void VisitAssembly(IAssemblySymbol symbol) 227public override string VisitAssembly(IAssemblySymbol symbol) 390public override int VisitAssembly(IAssemblySymbol symbol, StringBuilder argument) 536IAssemblySymbol asm = new SourceAssemblySymbol(c.SourceAssembly); 587IAssemblySymbol asm = new SourceAssemblySymbol(c.SourceAssembly); 638IAssemblySymbol asm = new SourceAssemblySymbol(c.SourceAssembly); 695IAssemblySymbol asm = new SourceAssemblySymbol(c.SourceAssembly); 739IAssemblySymbol asm = new SourceAssemblySymbol(c.SourceAssembly); 783IAssemblySymbol asm = new SourceAssemblySymbol(c.SourceAssembly);
Symbols\Metadata\PE\TypeForwarders.cs (1)
1521private static IEnumerable<string> GetNamesOfForwardedTypes(IAssemblySymbol assembly)
Symbols\Source\ExternAliasTests.cs (1)
484var aliasedGlobalNamespace = ((IAssemblySymbol)comp.GetAssemblyOrModuleSymbol(libRef)).GlobalNamespace;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (7)
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (2)
191var assemblySymbol = (IAssemblySymbol?)compilation.GetAssemblyOrModuleSymbol(reference);
Utilities\SymbolEquivalenceComparerTests.cs (5)
1646private sealed class AssemblySymbolIdentityComparer : IEqualityComparer<IAssemblySymbol> 1648public static readonly IEqualityComparer<IAssemblySymbol> Instance = new AssemblySymbolIdentityComparer(); 1650public bool Equals(IAssemblySymbol x, IAssemblySymbol y) 1653public int GetHashCode(IAssemblySymbol obj)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
AbstractTypeParameterChecker.cs (1)
146public sealed override void VisitAssembly(IAssemblySymbol symbol)
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (2)
MetadataAsSource\OmniSharpMetadataAsSourceHelpers.cs (2)
13public static string GetAssemblyInfo(IAssemblySymbol assemblySymbol) 16public static string GetAssemblyDisplay(Compilation compilation, IAssemblySymbol assemblySymbol)
Microsoft.CodeAnalysis.Features (41)
AddImport\AbstractAddImportFeatureService.cs (4)
128var projectToAssembly = new ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol>>(concurrencyLevel: 2, capacity: project.Solution.ProjectIds.Count); 160ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol>> projectToAssembly, 203ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol>> projectToAssembly, 275if (compilation.GetAssemblyOrModuleSymbol(reference) is IAssemblySymbol assembly)
AddImport\SearchScopes\MetadataSymbolsSearchScope.cs (2)
21private readonly IAssemblySymbol _assembly; 27IAssemblySymbol assembly,
AddImport\SearchScopes\SourceSymbolsProjectSearchScope.cs (3)
24private readonly ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol?>> _projectToAssembly; 28ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol?>> projectToAssembly, 56static AsyncLazy<IAssemblySymbol?> CreateLazyAssembly(Project project)
AddImport\SymbolReferenceFinder.cs (2)
99ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol>> projectToAssembly, 108IAssemblySymbol assembly, Project assemblyProject, PortableExecutableReference metadataReference,
AddImport\SymbolReferenceFinder_PackageAssemblySearch.cs (2)
148var assemblySymbol = compilation.GetAssemblyOrModuleSymbol(reference) as IAssemblySymbol;
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (1)
190var targetSymbol = compilation.Assembly;
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (2)
190if (originCompilation.GetAssemblyOrModuleSymbol(peReference) is not IAssemblySymbol assemblySymbol) 210IAssemblySymbol assembly,
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (4)
179var originatingAssembly = _originatingSemanticModel.Compilation.Assembly; 182var assembly = compilation.Assembly; 221_originatingSemanticModel.Compilation.GetAssemblyOrModuleSymbol(peReference) is not IAssemblySymbol assembly) 351IAssemblySymbol assembly,
Completion\Providers\ImportCompletionProvider\TypeImportCompletionCacheEntry.cs (1)
54if (AssemblySymbolKey.Resolve(originCompilation).Symbol is not IAssemblySymbol assemblySymbol)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
901IAssemblySymbol containingAssembly,
DeclarationComputer.cs (1)
56var assemblyToScope = model.Compilation.Assembly;
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (5)
2250private sealed class AssemblyEqualityComparer : IEqualityComparer<IAssemblySymbol?> 2252public static readonly IEqualityComparer<IAssemblySymbol?> Instance = new AssemblyEqualityComparer(); 2254public bool Equals(IAssemblySymbol? x, IAssemblySymbol? y) 2268public int GetHashCode(IAssemblySymbol? obj)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (3)
138var assembly = symbol.ContainingAssembly; 209private void EnqueueFullProjectDependency(Project project, IAssemblySymbol? internalVisibleToAssembly = null) 232var assembly = compilation.Assembly;
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (1)
32public override void VisitAssembly(IAssemblySymbol symbol)
MetadataAsSource\AbstractMetadataAsSourceService.AbstractWrappedSymbol.cs (1)
31public IAssemblySymbol ContainingAssembly => _symbol.ContainingAssembly;
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (2)
200private (MetadataReference? metadataReference, string? assemblyLocation, bool isReferenceAssembly) GetReferenceInfo(Compilation compilation, IAssemblySymbol containingAssembly) 361var containingAssembly = topLevelNamedType.ContainingAssembly;
MetadataAsSource\MetadataAsSourceHelpers.cs (3)
33public static string GetAssemblyInfo(IAssemblySymbol assemblySymbol) 41public static string GetAssemblyDisplay(Compilation compilation, IAssemblySymbol assemblySymbol) 97public static bool IsReferenceAssembly(IAssemblySymbol assemblySymbol)
SolutionCrawler\WorkCoordinator.SemanticChangeProcessor.cs (3)
137var assembly = symbol.ContainingAssembly; 208private void EnqueueFullProjectDependency(Project project, IAssemblySymbol? internalVisibleToAssembly = null) 231var assembly = compilation.Assembly;
Microsoft.CodeAnalysis.Test.Utilities (1)
CompilationVerifier.cs (1)
665return ((IAssemblySymbol)symbol).Modules.First();
Microsoft.CodeAnalysis.VisualBasic (19)
Compilation\VisualBasicCompilation.vb (2)
1336Private Protected Overrides Function CommonGetMetadataReference(assemblySymbol As IAssemblySymbol) As MetadataReference 2710Protected Overrides ReadOnly Property CommonAssembly As IAssemblySymbol
SymbolDisplay\SymbolDisplayVisitor.vb (1)
154Public Overrides Sub VisitAssembly(symbol As IAssemblySymbol)
Symbols\AssemblySymbol.vb (13)
85Public Overridable ReadOnly Property IsInteractive As Boolean Implements IAssemblySymbol.IsInteractive 96Public MustOverride Function GetMetadata() As AssemblyMetadata Implements IAssemblySymbol.GetMetadata 101Public MustOverride ReadOnly Property Identity As AssemblyIdentity Implements IAssemblySymbol.Identity, IAssemblySymbolInternal.Identity 448Public MustOverride ReadOnly Property TypeNames As ICollection(Of String) Implements IAssemblySymbol.TypeNames 450Public MustOverride ReadOnly Property NamespaceNames As ICollection(Of String) Implements IAssemblySymbol.NamespaceNames 701Public MustOverride ReadOnly Property MightContainExtensionMethods As Boolean Implements IAssemblySymbol.MightContainExtensionMethods 718Private ReadOnly Property IAssemblySymbol_GlobalNamespace As INamespaceSymbol Implements IAssemblySymbol.GlobalNamespace 724Private Function IAssemblySymbol_GivesAccessTo(assemblyWantingAccess As IAssemblySymbol) As Boolean Implements IAssemblySymbol.GivesAccessTo 750Private ReadOnly Property IAssemblySymbol_Modules As IEnumerable(Of IModuleSymbol) Implements IAssemblySymbol.Modules 756Private Function IAssemblySymbol_ResolveForwardedType(metadataName As String) As INamedTypeSymbol Implements IAssemblySymbol.ResolveForwardedType 760Private Function IAssemblySymbol_GetForwardedTypes() As ImmutableArray(Of INamedTypeSymbol) Implements IAssemblySymbol.GetForwardedTypes 764Private Function IAssemblySymbol_GetTypeByMetadataName(metadataName As String) As INamedTypeSymbol Implements IAssemblySymbol.GetTypeByMetadataName
Symbols\ModuleSymbol.vb (2)
317Private ReadOnly Property IModuleSymbol_ReferencedAssemblySymbols As ImmutableArray(Of IAssemblySymbol) Implements IModuleSymbol.ReferencedAssemblySymbols 319Return ImmutableArray(Of IAssemblySymbol).CastUp(ReferencedAssemblySymbols)
Symbols\Symbol.vb (1)
1114Private ReadOnly Property ISymbol_ContainingAssembly As IAssemblySymbol Implements ISymbol.ContainingAssembly
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
LineCommit\CommitBufferManager.vb (1)
310Dim refAssembly = DirectCast(refAssemblyOrModule, IAssemblySymbol)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (5)
Attributes\InternalsVisibleToAndStrongNameTests.vb (4)
861Assert.True(DirectCast(other.Assembly, IAssemblySymbol).GivesAccessTo(requestor.Assembly)) 960Assert.True(DirectCast(other.Assembly, IAssemblySymbol).GivesAccessTo(requestor.Assembly)) 991Assert.False(DirectCast(other.Assembly, IAssemblySymbol).GivesAccessTo(requestor.Assembly)) 1025Assert.True(DirectCast(giver.Assembly, IAssemblySymbol).GivesAccessTo(requestor.Assembly))
Emit\DeterministicTests.vb (1)
261Return DirectCast(assembly, IAssemblySymbol).GetForwardedTypes()
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Compilation\CompilationAPITests.vb (1)
2508Assert.Null(comp.GetMetadataReference(DirectCast(assembly.GetISymbol(), IAssemblySymbol)))
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
SymbolsTests\Metadata\PE\MissingTypeReferences.vb (1)
478Assert.Empty(DirectCast(missingAssembly, IAssemblySymbol).GetForwardedTypes())
SymbolsTests\Metadata\PE\TypeForwarders.vb (1)
1138Return DirectCast(assembly, IAssemblySymbol).GetForwardedTypes().Select(Function(t) t.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat))
Microsoft.CodeAnalysis.Workspaces (96)
CodeGenerationAbstractNamedTypeSymbol.cs (1)
28IAssemblySymbol containingAssembly,
CodeGenerationNamedTypeSymbol.cs (1)
28IAssemblySymbol containingAssembly,
CodeGenerationNamespaceOrTypeSymbol.cs (1)
20IAssemblySymbol containingAssembly,
CodeGenerationSymbol.cs (2)
35IAssemblySymbol containingAssembly, 84public IAssemblySymbol ContainingAssembly { get; }
CodeGenerationSymbolFactory.cs (2)
427IAssemblySymbol? containingAssembly = null) 446IAssemblySymbol? containingAssembly = null)
CodeGenerationTypeSymbol.cs (1)
22IAssemblySymbol containingAssembly,
Editing\SymbolEditor.cs (1)
132private ImmutableArray<ProjectId> GetProjectsForAssembly(IAssemblySymbol assembly)
FindSymbols\Declarations\DeclarationFinder.cs (1)
71AsyncLazy<IAssemblySymbol?> lazyAssembly,
FindSymbols\Declarations\DeclarationFinder_AllDeclarations.cs (3)
117var lazyAssembly = new AsyncLazy<IAssemblySymbol?>(async cancellationToken => 120var assemblySymbol = compilation.GetAssemblyOrModuleSymbol(peReference) as IAssemblySymbol;
FindSymbols\FindReferences\DependentProjectsFinder.cs (9)
85/// cref="IAssemblySymbol"/> for both source and metadata symbols, and an optional <see cref="Project"/> if this 88private static Dictionary<IAssemblySymbol, (Project? sourceProject, SymbolVisibility maxVisibility)> GetSymbolOriginations( 91var result = new Dictionary<IAssemblySymbol, (Project? sourceProject, SymbolVisibility visibility)>(); 95var assembly = symbol.OriginalDefinition.ContainingAssembly; 112(IAssemblySymbol assembly, Project? sourceProject) symbolOrigination, 211(IAssemblySymbol assembly, Project? sourceProject) symbolOrigination, 236private static HashSet<string> GetInternalsVisibleToSet(IAssemblySymbol assembly) 259(IAssemblySymbol assembly, Project? sourceProject) symbolOrigination, 293if (compilation.GetAssemblyOrModuleSymbol(reference) is IAssemblySymbol symbol &&
FindSymbols\SymbolFinder_Helpers.cs (1)
211foreach (var assembly in forwardedToCompilation.GetReferencedAssemblySymbols())
FindSymbols\SymbolTree\SymbolTreeInfo.cs (8)
27/// will still incur a heavy cost (for example, getting the <see cref="IAssemblySymbol"/> root symbol for a 122SearchQuery query, IAssemblySymbol assembly, SymbolFilter filter, CancellationToken cancellationToken) 129query, new AsyncLazy<IAssemblySymbol?>(assembly), filter, cancellationToken); 133SearchQuery query, AsyncLazy<IAssemblySymbol?> lazyAssembly, 146SearchQuery query, AsyncLazy<IAssemblySymbol?> lazyAssembly, CancellationToken cancellationToken) 171AsyncLazy<IAssemblySymbol?> lazyAssembly, string name, CancellationToken cancellationToken) 189AsyncLazy<IAssemblySymbol?> lazyAssembly, 198IAssemblySymbol? assemblySymbol = null;
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (1)
121var assembly = compilation?.Assembly;
IAssemblySymbolExtensions.cs (7)
14this List<IAssemblySymbol> assemblies, 19foreach (var a in assemblies) 30public static bool ContainsTypeName(this List<IAssemblySymbol> assemblies, string typeName, bool tryWithAttributeSuffix = false) 36foreach (var a in assemblies) 47foreach (var a in assemblies) 60public static bool IsSameAssemblyOrHasFriendAccessTo(this IAssemblySymbol assembly, IAssemblySymbol toAssembly)
ICompilationExtensions.cs (2)
42public static ImmutableArray<IAssemblySymbol> GetReferencedAssemblySymbols(this Compilation compilation, bool excludePreviousSubmissions = false) 60var builder = ArrayBuilder<IAssemblySymbol>.GetInstance();
ISymbolExtensions_Accessibility.cs (13)
21if (within is IAssemblySymbol assembly) 40IAssemblySymbol within, 90Debug.Assert(within is INamedTypeSymbol or IAssemblySymbol); 182Debug.Assert(within is INamedTypeSymbol or IAssemblySymbol); 216IAssemblySymbol assembly, 220Debug.Assert(within is INamedTypeSymbol or IAssemblySymbol); 222var withinAssembly = (within as IAssemblySymbol) ?? ((INamedTypeSymbol)within).ContainingAssembly; 257Debug.Assert(within is INamedTypeSymbol or IAssemblySymbol); 264var withinAssembly = (within as IAssemblySymbol) ?? ((INamedTypeSymbol)within).ContainingAssembly; 338IAssemblySymbol withinAssembly, 416Debug.Assert(within is INamedTypeSymbol or IAssemblySymbol);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs\ISymbolExtensions.cs (1)
475[NotNullWhen(true)] this ISymbol? symbol, ISymbol withinType, IAssemblySymbol withinAssembly, CancellationToken cancellationToken)
Shared\Extensions\INamespaceSymbolExtensions.cs (2)
138IAssemblySymbol assembly) 167IAssemblySymbol assembly,
SymbolEquivalenceComparer.AssemblyComparers.cs (5)
11private sealed class SimpleNameAssemblyComparer : IEqualityComparer<IAssemblySymbol?> 13public static readonly IEqualityComparer<IAssemblySymbol> Instance = new SimpleNameAssemblyComparer(); 15public bool Equals(IAssemblySymbol? x, IAssemblySymbol? y) 18public int GetHashCode(IAssemblySymbol? obj)
SymbolEquivalenceComparer.cs (2)
46private readonly IEqualityComparer<IAssemblySymbol>? _assemblyComparerOpt; 54IEqualityComparer<IAssemblySymbol>? assemblyComparerOpt,
SymbolEquivalenceComparer.EquivalenceVisitor.cs (4)
119SymbolKind.Assembly => AssembliesAreEquivalent((IAssemblySymbol)x, (IAssemblySymbol)y), 150private bool AssembliesAreEquivalent(IAssemblySymbol x, IAssemblySymbol y)
SymbolEquivalenceComparer.GetHashCodeVisitor.cs (2)
63SymbolKind.Assembly => CombineHashCodes((IAssemblySymbol)x, currentHash), 89private int CombineHashCodes(IAssemblySymbol x, int currentHash)
SymbolKey.AssemblySymbolKey.cs (5)
11private sealed class AssemblySymbolKey : AbstractSymbolKey<IAssemblySymbol> 15public sealed override void Create(IAssemblySymbol symbol, SymbolKeyWriter visitor) 23SymbolKeyReader reader, IAssemblySymbol? contextualSymbol, out string? failureReason) 29using var result = PooledArrayBuilder<IAssemblySymbol>.GetInstance(); 36foreach (var assembly in compilation.GetReferencedAssemblySymbols())
SymbolKey.cs (2)
27/// <item>Two <see cref="IAssemblySymbol"/>s are the "same" if 28/// they have equal <see cref="IAssemblySymbol.Identity"/>.Name</item>
SymbolKey.ModuleSymbolKey.cs (2)
28foreach (var assembly in containingSymbolResolution.OfType<IAssemblySymbol>())
SymbolKey.NamespaceSymbolKey.cs (1)
94case IAssemblySymbol assembly:
SymbolKey.SymbolKeyReader.cs (1)
717if (assemblyResolution.GetAnySymbol() is IAssemblySymbol assembly)
SymbolKey.SymbolKeyWriter.cs (1)
332public override void VisitAssembly(IAssemblySymbol assemblySymbol)
Workspace\Solution\Solution.cs (4)
138public Project? GetProject(IAssemblySymbol assemblySymbol, 152/// This function differs from <see cref="GetProject(IAssemblySymbol, CancellationToken)"/> in terms of how it 153/// treats <see cref="IAssemblySymbol"/>s. Specifically, say there is the following: 161/// symbol than Symbol-A from Project-A. However, <see cref="GetProject(IAssemblySymbol, CancellationToken)"/>
Workspace\Solution\SolutionState.CompilationTracker.cs (1)
361r => solution.GetProjectState(inProgressCompilationNotRef.GetAssemblyOrModuleSymbol(r) as IAssemblySymbol)?.Id == projectReference.ProjectId);
Workspace\Solution\SolutionState.cs (2)
406public ProjectState? GetProjectState(IAssemblySymbol? assemblySymbol) 1952/// Symbols need to be either <see cref="IAssemblySymbol"/> or <see cref="IModuleSymbol"/>.
Workspace\Solution\SolutionState.ICompilationTracker.cs (2)
24/// given <paramref name="symbol"/>. The symbol must be a <see cref="IAssemblySymbol"/>, <see 30/// cref="IAssemblySymbol"/> and <paramref name="primary"/> is <see langword="true"/> then this will only
Workspace\Solution\SolutionState.UnrootedSymbolSet.cs (5)
38/// The <see cref="IAssemblySymbol"/> produced directly by <see cref="Compilation.Assembly"/>. 40public readonly WeakReference<IAssemblySymbol> PrimaryAssemblySymbol; 49/// The <see cref="IAssemblySymbol"/>s or <see cref="IModuleSymbol"/>s produced through <see 57WeakReference<IAssemblySymbol> primaryAssemblySymbol, 68var primaryAssembly = new WeakReference<IAssemblySymbol>(compilation.Assembly);
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\MSBuildWorkspace.cs (2)
578var symbol = compilation.GetAssemblyOrModuleSymbol(metadataReference) as IAssemblySymbol;
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (8)
VisualStudioMSBuildWorkspaceTests.cs (8)
1892var sym = (IAssemblySymbol)mtcomp.GetAssemblyOrModuleSymbol(mtref); 1915var sym = (IAssemblySymbol)mtcomp.GetAssemblyOrModuleSymbol(mtref); 1939var sym = (IAssemblySymbol)mtcomp.GetAssemblyOrModuleSymbol(mtref); 1962var sym = (IAssemblySymbol)mtcomp.GetAssemblyOrModuleSymbol(mtref);
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
SolutionTests\SolutionTests.cs (3)
2301var assemblyReference = (IAssemblySymbol)solution.GetProject(project1).GetCompilationAsync().Result.GetAssemblyOrModuleSymbol(mefReference); 2308assemblyReference = (IAssemblySymbol)solution.GetProject(project1).GetCompilationAsync().Result.GetAssemblyOrModuleSymbol(mefReference);
Microsoft.VisualStudio.LanguageServices (40)
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (2)
47protected void AddAssemblyLink(IAssemblySymbol assemblySymbol) 271if (containingSymbol is IAssemblySymbol assemblySymbol)
Library\ObjectBrowser\AbstractListItemFactory.cs (17)
136private static bool IncludeMemberSymbol(ISymbol symbol, IAssemblySymbol assemblySymbol) 407public void CollectNamespaceListItems(IAssemblySymbol assemblySymbol, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString) 449var assemblySymbol = parentListItem is ReferenceListItem 460private class AssemblySymbolComparer : IEqualityComparer<Tuple<ProjectId, IAssemblySymbol>> 462public bool Equals(Tuple<ProjectId, IAssemblySymbol> x, Tuple<ProjectId, IAssemblySymbol> y) 465public int GetHashCode(Tuple<ProjectId, IAssemblySymbol> obj) 469public ImmutableHashSet<Tuple<ProjectId, IAssemblySymbol>> GetAssemblySet(Solution solution, string languageName, CancellationToken cancellationToken) 501if (compilation.GetAssemblyOrModuleSymbol(reference) is IAssemblySymbol referenceAssembly) 512public ImmutableHashSet<Tuple<ProjectId, IAssemblySymbol>> GetAssemblySet(Project project, bool lookInReferences, CancellationToken cancellationToken) 531if (compilation.GetAssemblyOrModuleSymbol(reference) is IAssemblySymbol referenceAssembly) 542private static bool ContainsAccessibleTypeMember(INamespaceOrTypeSymbol namespaceOrTypeSymbol, IAssemblySymbol assemblySymbol) 555private static ImmutableArray<INamedTypeSymbol> GetAccessibleTypeMembers(INamespaceOrTypeSymbol namespaceOrTypeSymbol, IAssemblySymbol assemblySymbol) 571private static bool IncludeTypeMember(INamedTypeSymbol typeMember, IAssemblySymbol assemblySymbol) 661if (compilation.GetAssemblyOrModuleSymbol(reference) is IAssemblySymbol assemblySymbol) 752public void CollectTypeListItems(IAssemblySymbol assemblySymbol, Compilation compilation, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString) 785public void CollectMemberListItems(IAssemblySymbol assemblySymbol, Compilation compilation, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString)
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager_ListItems.cs (5)
16internal void CollectMemberListItems(IAssemblySymbol assemblySymbol, Compilation compilation, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString) 19internal void CollectNamespaceListItems(IAssemblySymbol assemblySymbol, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString) 22internal void CollectTypeListItems(IAssemblySymbol assemblySymbol, Compilation compilation, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString) 25internal ImmutableHashSet<Tuple<ProjectId, IAssemblySymbol>> GetAssemblySet(Solution solution, string languageName, CancellationToken cancellationToken) 28internal ImmutableHashSet<Tuple<ProjectId, IAssemblySymbol>> GetAssemblySet(Project project, bool lookInReferences, CancellationToken cancellationToken)
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager_Search.cs (4)
39ImmutableHashSet<Tuple<ProjectId, IAssemblySymbol>> projectAndAssemblySet) 58var assemblySymbol = projectIdAndAssembly.Item2; 73var assemblySymbol = projectIdAndAssembly.Item2; 94var assemblySymbol = projectIdAndAssembly.Item2;
Library\ObjectBrowser\Lists\ReferenceListItem.cs (2)
44public IAssemblySymbol GetAssembly(Compilation compilation) 45=> compilation.GetAssemblyOrModuleSymbol(_reference) as IAssemblySymbol;
Library\VsNavInfo\NavInfoFactory.cs (3)
39case IAssemblySymbol assemblySymbol: 61public IVsNavInfo CreateForAssembly(IAssemblySymbol assemblySymbol) 129private IVsNavInfo Create(IAssemblySymbol containingAssembly, Project project, Compilation compilation, bool useExpandedHierarchy = false,
Progression\GraphBuilder.cs (2)
249node = await GetOrCreateNodeAssemblyAsync(graph, (IAssemblySymbol)symbol, solution, cancellationToken).ConfigureAwait(false); 318private static async Task<GraphNode> GetOrCreateNodeAssemblyAsync(Graph graph, IAssemblySymbol assemblySymbol, Solution solution, CancellationToken cancellationToken)
Progression\GraphNodeCreation.cs (1)
36return await GraphNodeIdCreation.GetIdForAssemblyAsync((IAssemblySymbol)symbol, solution, cancellationToken).ConfigureAwait(false);
Progression\GraphNodeIdCreation.cs (4)
368private static IAssemblySymbol GetContainingAssembly(ISymbol symbol) 392var containingAssembly = GetContainingAssembly(symbol); 396private static async Task<Uri> GetAssemblyFullPathAsync(IAssemblySymbol containingAssembly, Solution solution, CancellationToken cancellationToken) 444internal static async Task<GraphNodeId> GetIdForAssemblyAsync(IAssemblySymbol assemblySymbol, Solution solution, CancellationToken cancellationToken)
Microsoft.VisualStudio.LanguageServices.Implementation (2)
CodeModel\Collections\ExternalNamespaceEnumerator.cs (1)
72var containingAssembly = project.GetCompilationAsync().Result.Assembly;
CodeModel\ExternalElements\AbstractExternalCodeType.cs (1)
41var assembly = type.ContainingAssembly;