89 references to GetAssemblyOrModuleSymbol
ConfigurationSchemaGenerator (1)
ConfigSchemaGenerator.cs (1)
24var assemblySymbol = (IAssemblySymbol)compilation.GetAssemblyOrModuleSymbol(inputReference);
Microsoft.CodeAnalysis (1)
Compilation\Compilation.cs (1)
1696if (a.Equals(compilation.GetAssemblyOrModuleSymbol(reference)))
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
RestrictedInternalsVisibleToAnalyzer.cs (1)
126foreach (var referencedAssemblySymbol in compilation.References.Select(compilation.GetAssemblyOrModuleSymbol).OfType<IAssemblySymbol>())
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenTupleTest.cs (2)
13919Assert.NotSame(comp2.Assembly, (AssemblySymbol)comp3.GetAssemblyOrModuleSymbol(comp2CompilationRef)); // We are interested in retargeting scenario 14084Assert.NotSame(comp2.Assembly, (AssemblySymbol)comp3.GetAssemblyOrModuleSymbol(comp2CompilationRef)); // We are interested in retargeting scenario
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (48)
Compilation\CompilationAPITests.cs (9)
3480var assembly1 = comp.GetAssemblyOrModuleSymbol(reference).GetPublicSymbol(); 3506var assembly1 = comp.GetAssemblyOrModuleSymbol(reference).GetPublicSymbol(); 3536var assembly1 = comp.GetAssemblyOrModuleSymbol(reference1).GetPublicSymbol(); 3539var assembly2 = comp.GetAssemblyOrModuleSymbol(reference2).GetPublicSymbol(); 3576var assembly1 = comp.GetAssemblyOrModuleSymbol(reference1).GetPublicSymbol(); 3579var assembly2 = comp.GetAssemblyOrModuleSymbol(reference2).GetPublicSymbol(); 3616var corlibAssembly = current.GetAssemblyOrModuleSymbol(corlibReference).GetPublicSymbol(); 3619var otherAssembly = current.GetAssemblyOrModuleSymbol(otherReference).GetPublicSymbol(); 3646var corlibAssembly = current.GetAssemblyOrModuleSymbol(corlibReference).GetPublicSymbol();
Compilation\ReferenceManagerTests.cs (12)
2188var a0 = c1.GetAssemblyOrModuleSymbol(refVectors40); 2189var a1 = c1.GetAssemblyOrModuleSymbol(refVectors41); 2198a0 = c2.GetAssemblyOrModuleSymbol(refVectors40); 2199a1 = c2.GetAssemblyOrModuleSymbol(refVectors41); 2539Assert.Equal("B", ((AssemblySymbol)c.GetAssemblyOrModuleSymbol(bRef)).Name); 2612Assert.Equal("B", ((AssemblySymbol)c.GetAssemblyOrModuleSymbol(b3RefY)).Name); 2613Assert.Null(c.GetAssemblyOrModuleSymbol(b3RefX)); 2782Assert.Equal("D", ((AssemblySymbol)c.GetAssemblyOrModuleSymbol(dRef)).Name); 2814Assert.Equal("B", ((AssemblySymbol)c.GetAssemblyOrModuleSymbol(bRef)).Name); 2815Assert.Equal("D", ((AssemblySymbol)c.GetAssemblyOrModuleSymbol(dRef)).Name); 2857((AssemblySymbol)c.GetAssemblyOrModuleSymbol(b3Ref)).Identity.GetDisplayName()); 2859Assert.Null((AssemblySymbol)c.GetAssemblyOrModuleSymbol(b2Ref));
Compilation\UsedAssembliesTests.cs (13)
77Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference)); 97Assert.Same(comp.ObjectType.ContainingAssembly, comp.GetAssemblyOrModuleSymbol(used[0])); 405Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference)); 439Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference)); 490Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference)); 561Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference1)); 644Assert.Same(comp2.ObjectType.ContainingAssembly, comp2.GetAssemblyOrModuleSymbol(used[0])); 659Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference0)); 666Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp3).GetAssemblyOrModuleSymbol(references.Last())); 1383Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference)); 2005Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference)); 2333Assert.Same(comp.ObjectType.ContainingAssembly, comp.GetAssemblyOrModuleSymbol(used[0])); 2472Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference1));
Symbols\CovariantReturnTests.cs (4)
470var sourceAssembly = (AssemblySymbol)result.GetAssemblyOrModuleSymbol(compAsMetadata); 522var retargetingAssembly = (AssemblySymbol)result.GetAssemblyOrModuleSymbol(compAsMetadata); 4024var lastReference = compilation.GetAssemblyOrModuleSymbol(compilation.References.Last()); 4262var lastReference = compilation.GetAssemblyOrModuleSymbol(compilation.References.Last());
Symbols\SymbolDistinguisherTests.cs (10)
39var referencedAssembly = (AssemblySymbol)comp.GetAssemblyOrModuleSymbol(libRef); 102var referencedAssembly = (AssemblySymbol)comp.GetAssemblyOrModuleSymbol(libRef); 143var referencedAssembly = (AssemblySymbol)comp.GetAssemblyOrModuleSymbol(libRef); 162var referencedAssembly = (AssemblySymbol)comp.GetAssemblyOrModuleSymbol(libRef); 186var referencedAssembly = (AssemblySymbol)comp.GetAssemblyOrModuleSymbol(libRef); 212var referencedAssembly = (AssemblySymbol)comp.GetAssemblyOrModuleSymbol(libRef); 237var referencedAssembly = (AssemblySymbol)comp.GetAssemblyOrModuleSymbol(libRef); 262var referencedAssembly = (AssemblySymbol)comp.GetAssemblyOrModuleSymbol(libRef); 284var referencedAssembly = (AssemblySymbol)comp.GetAssemblyOrModuleSymbol(libRef); 301var referencedAssembly = (AssemblySymbol)comp.GetAssemblyOrModuleSymbol(libRef);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
Extensions.cs (2)
29return (AssemblySymbol)compilation.GetAssemblyOrModuleSymbol(reference); 34return (ModuleSymbol)compilation.GetAssemblyOrModuleSymbol(reference);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (1)
178var assemblySymbol = (IAssemblySymbol?)compilation.GetAssemblyOrModuleSymbol(reference);
Microsoft.CodeAnalysis.Features (2)
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (1)
206originCompilation.GetAssemblyOrModuleSymbol(peReference) is not IAssemblySymbol assemblySymbol)
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (1)
210_originatingSemanticModel.Compilation.GetAssemblyOrModuleSymbol(peReference) is not IAssemblySymbol assembly)
Microsoft.CodeAnalysis.Test.Utilities (1)
CompilationVerifier.cs (1)
824var symbol = dummy.GetAssemblyOrModuleSymbol(metadataReference);
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
LineCommit\CommitBufferManager.vb (1)
317Dim refAssemblyOrModule = compilation.GetAssemblyOrModuleSymbol(reference)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (9)
UsedAssembliesTests.vb (9)
73Assert.IsType(Of TAssemblySymbol)(DirectCast(comp2, VisualBasicCompilation).GetAssemblyOrModuleSymbol(reference)) 78Assert.IsType(Of TAssemblySymbol)(DirectCast(comp2, VisualBasicCompilation).GetAssemblyOrModuleSymbol(reference1)) 88Assert.Same(comp.ObjectType.ContainingAssembly, comp.GetAssemblyOrModuleSymbol(used(0))) 225Assert.IsType(Of TAssemblySymbol)(DirectCast(comp2, VisualBasicCompilation).GetAssemblyOrModuleSymbol(reference)) 259Assert.IsType(Of TAssemblySymbol)(DirectCast(comp2, VisualBasicCompilation).GetAssemblyOrModuleSymbol(reference)) 381Assert.IsType(Of TAssemblySymbol)(DirectCast(comp2, VisualBasicCompilation).GetAssemblyOrModuleSymbol(reference1)) 467Assert.Same(comp2.ObjectType.ContainingAssembly, comp2.GetAssemblyOrModuleSymbol(used(0))) 482Assert.IsType(Of TAssemblySymbol)(DirectCast(comp2, VisualBasicCompilation).GetAssemblyOrModuleSymbol(reference0)) 2058Assert.Same(comp.ObjectType.ContainingAssembly, comp.GetAssemblyOrModuleSymbol(used(0)))
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
Extensions.vb (2)
17Return DirectCast(compilation.GetAssemblyOrModuleSymbol(reference), AssemblySymbol) 22Return DirectCast(compilation.GetAssemblyOrModuleSymbol(reference), ModuleSymbol)
Microsoft.CodeAnalysis.Workspaces (7)
FindSymbols\Declarations\DeclarationFinder_AllDeclarations.cs (1)
122var assemblySymbol = compilation.GetAssemblyOrModuleSymbol(arg.peReference) as IAssemblySymbol;
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
372var name = compilation.GetAssemblyOrModuleSymbol(peReference) is IAssemblySymbol { Name: string metadataAssemblyName }
Workspace\Solution\SolutionCompilationState.CompilationTracker.CompilationTrackerState.cs (1)
258var symbol = compilation.GetAssemblyOrModuleSymbol(metadataReference);
Workspace\Solution\SolutionCompilationState.ICompilationTracker.cs (1)
30/// of the symbols returned by <see cref="Compilation.GetAssemblyOrModuleSymbol(MetadataReference)"/> for
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (1)
555r => GetProjectId(inProgressCompilationNotRef.GetAssemblyOrModuleSymbol(r) as IAssemblySymbol) == projectReference.ProjectId);
Workspace\Solution\SolutionCompilationState.RootedSymbolSet.cs (2)
57/// cref="Compilation.GetAssemblyOrModuleSymbol(MetadataReference)"/> for all the references exposed by <see 79var symbol = compilation.GetAssemblyOrModuleSymbol(reference);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (4)
VisualStudioMSBuildWorkspaceTests.cs (4)
1887var sym = (IAssemblySymbol)mtcomp.GetAssemblyOrModuleSymbol(mtref); 1910var sym = (IAssemblySymbol)mtcomp.GetAssemblyOrModuleSymbol(mtref); 1934var sym = (IAssemblySymbol)mtcomp.GetAssemblyOrModuleSymbol(mtref); 1957var sym = (IAssemblySymbol)mtcomp.GetAssemblyOrModuleSymbol(mtref);
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SolutionTests\SolutionTests.cs (2)
2975var assemblyReference = (IAssemblySymbol)solution.GetProject(project1).GetCompilationAsync().Result.GetAssemblyOrModuleSymbol(mefReference); 2982assemblyReference = (IAssemblySymbol)solution.GetProject(project1).GetCompilationAsync().Result.GetAssemblyOrModuleSymbol(mefReference);
Microsoft.Maui.Controls.SourceGen (1)
CodeBehindGenerator.cs (1)
207 if (compilation.GetAssemblyOrModuleSymbol(reference) is not IAssemblySymbol symbol)
Microsoft.VisualStudio.LanguageServices (4)
Library\ObjectBrowser\AbstractListItemFactory.cs (3)
496if (compilation.GetAssemblyOrModuleSymbol(reference) is IAssemblySymbol referenceAssembly) 524if (compilation.GetAssemblyOrModuleSymbol(reference) is IAssemblySymbol referenceAssembly) 654if (compilation.GetAssemblyOrModuleSymbol(reference) is IAssemblySymbol assemblySymbol)
Library\ObjectBrowser\Lists\ReferenceListItem.cs (1)
41=> compilation.GetAssemblyOrModuleSymbol(MetadataReference) as IAssemblySymbol;