1 write to ExternalReferences
Microsoft.CodeAnalysis (1)
Compilation\Compilation.cs (1)
88this.ExternalReferences = references;
120 references to ExternalReferences
Microsoft.CodeAnalysis (7)
Compilation\Compilation.cs (4)
220ExternalReferences.Concat(DirectiveReferences), 727foreach (var reference in ExternalReferences) 805return CommonWithReferences(this.ExternalReferences.Union(references)); 835var refSet = new HashSet<MetadataReference>(this.ExternalReferences);
MetadataReference\MetadataReferenceResolver.cs (1)
21/// doesn't match any of the assemblies explicitly referenced by the <see cref="Compilation"/> (via <see cref="Compilation.ExternalReferences"/>, or #r directives.
ReferenceManager\CommonReferenceManager.Resolution.cs (1)
838referencesBuilder.AddRange(compilation.ExternalReferences);
SourceGeneration\Nodes\SharedInputNodes.cs (1)
30public static readonly InputNode<MetadataReference> MetadataReferences = new InputNode<MetadataReference>(b => b.Compilation.ExternalReferences);
Microsoft.CodeAnalysis.CSharp (7)
Compilation\CSharpCompilation.cs (7)
561this.ExternalReferences, 580this.ExternalReferences, 603this.ExternalReferences, 665this.ExternalReferences, 705this.ExternalReferences, 729this.ExternalReferences, 748this.ExternalReferences,
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (2)
InteractiveSessionReferencesTests.cs (2)
511}, c0.ExternalReferences.SelectAsArray(m => m.Display)); 545}, c0.ExternalReferences.SelectAsArray(m => m.Display));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\AccessCheckTests.cs (2)
739IAssemblySymbol mscorlibAssem = ((CSharpCompilation)c).GetReferencedAssemblySymbol(c.ExternalReferences[0]).GetPublicSymbol(); 900IAssemblySymbol mscorlibAssem = ((CSharpCompilation)c1).GetReferencedAssemblySymbol(c1.ExternalReferences[0]).GetPublicSymbol();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (65)
Compilation\CompilationAPITests.cs (40)
365Assert.Equal(1, comp.ExternalReferences.Length); 366var ref1 = comp.ExternalReferences[0]; 496Assert.Equal(0, comp.ExternalReferences.Length); 503Assert.Equal(1, comp.ExternalReferences.Length); 504Assert.Equal(MetadataImageKind.Assembly, comp.ExternalReferences[0].Properties.Kind); 505Assert.Equal(ref1, comp.ExternalReferences[0]); 509Assert.Equal(1, comp.ExternalReferences.Length); 510Assert.Equal(MetadataImageKind.Assembly, comp.ExternalReferences[0].Properties.Kind); 511Assert.Equal(ref2, comp.ExternalReferences[0]); 515Assert.Equal(0, comp.ExternalReferences.Length); 521Assert.Equal(1, compCollection.ExternalReferences.Length); 523Assert.Equal(0, compCollection.ExternalReferences.Length); 529Assert.Equal(0, compCollection.ExternalReferences.Length); 531Assert.Equal(0, comp.ExternalReferences.Length); 540Assert.Equal(0, compCollection.ExternalReferences.Length); 542Assert.Equal(0, compCollection.ExternalReferences.Length); 551Assert.Equal(0, compCollection.ExternalReferences.Length); 553Assert.Equal(0, compCollection.ExternalReferences.Length); 961Assert.Equal(0, comp.ExternalReferences.Length); 972Assert.Equal(1, comp1.ExternalReferences.Length); 1174Assert.Equal(1, comp.ExternalReferences.Length); 1194Assert.Equal(2, comp.ExternalReferences.Length); 1203Assert.Equal(3, comp.ExternalReferences.Length); 1208Assert.Equal(3, comp.ExternalReferences.Length); 1213Assert.Equal(3, comp.ExternalReferences.Length); 1284Assert.Equal(3, comp.ExternalReferences.Length); 1286Assert.True(comp.ExternalReferences[2] is CSharpCompilationReference, "Expected compilation reference"); 1287Assert.Equal(compRef1, comp.ExternalReferences[2]); 1292Assert.Equal(3, comp.ExternalReferences.Length); 1293Assert.Equal(MetadataImageKind.Module, comp.ExternalReferences[2].Properties.Kind); 1294Assert.Equal(modRef1, comp.ExternalReferences[2]); 1303Assert.Equal(0, comp.ExternalReferences.Length); 1417Assert.Equal(1, comp.ExternalReferences.Length); 1418Assert.Equal(MetadataImageKind.Assembly, comp.ExternalReferences[0].Properties.Kind); 1419Assert.Equal(ref1, comp.ExternalReferences[0]); 1425Assert.Equal(1, comp.ExternalReferences.Length); 1426Assert.Equal(MetadataImageKind.Assembly, comp.ExternalReferences[0].Properties.Kind); 1427Assert.Equal(ref2, comp.ExternalReferences[0]); 1441Assert.Equal(1, comp.ExternalReferences.Length); 1444Assert.Equal(1, comp.ExternalReferences.Length);
Compilation\ReferenceManagerTests.cs (1)
878var refs = compilation.ExternalReferences;
Symbols\Metadata\MetadataMemberTests.cs (5)
153var mscorlib = compilation.ExternalReferences[0]; 188var mscorlib = compilation.ExternalReferences[0]; 240var mscorlib = compilation.ExternalReferences[0]; 300var mscorlib = compilation.ExternalReferences[0]; 345var mscorlib = compilation.ExternalReferences[0];
Symbols\Metadata\MetadataTypeTests.cs (6)
29var mscorlib = compilation.ExternalReferences[0]; 69var mscorlib = compilation.ExternalReferences[0]; 119var mscorlib = compilation.ExternalReferences[0]; 169var mscorlib = compilation.ExternalReferences[0]; 219var mscorlib = compilation.ExternalReferences[0]; 286var compilation1Lib = compilation2.ExternalReferences[2];
Symbols\Source\PropertyTests.cs (13)
2613Assert.Equal(2, comp.ExternalReferences.Length); 2614Assert.False(comp.ExternalReferences[1].Properties.EmbedInteropTypes); 2631Assert.Equal(2, comp.ExternalReferences.Length); 2632Assert.False(comp.ExternalReferences[1].Properties.EmbedInteropTypes); 2649Assert.Equal(2, comp.ExternalReferences.Length); 2650Assert.True(comp.ExternalReferences[1].Properties.EmbedInteropTypes); 2667Assert.Equal(2, comp.ExternalReferences.Length); 2668Assert.True(comp.ExternalReferences[1].Properties.EmbedInteropTypes); 2681Assert.Equal(2, comp.ExternalReferences.Length); 2706Assert.Equal(2, comp.ExternalReferences.Length); 2707Assert.True(comp.ExternalReferences[1].Properties.EmbedInteropTypes); 2724Assert.Equal(2, comp.ExternalReferences.Length); 2725Assert.True(comp.ExternalReferences[1].Properties.EmbedInteropTypes);
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (7)
Metadata\WinMdEventTests.cs (1)
2747var winmdlib = comp.ExternalReferences.Where(r => r.Display == "Windows").Single();
Metadata\WinMdMetadataTests.cs (6)
46var winmdlib = comp.ExternalReferences.Where(r => r.Display == "Windows").Single(); 68var winmdlib = comp.ExternalReferences.Where(r => r.Display == "Windows").Single(); 89var winmdlib = comp.ExternalReferences.Where(r => r.Display == "Windows").Single(); 109var winmdlib = comp.ExternalReferences.Where(r => r.Display == "Windows").Single(); 129var winmdlib = comp.ExternalReferences.Where(r => r.Display == "Windows").Single(); 171var winmdlib = comp.ExternalReferences.Where(r => r.Display == "Windows").Single();
Microsoft.CodeAnalysis.VisualBasic (7)
Compilation\VisualBasicCompilation.vb (7)
509Me.ExternalReferences, 535Me.ExternalReferences, 561Me.ExternalReferences, 657Me.ExternalReferences, 692Me.ExternalReferences, 718Me.ExternalReferences, 740Me.ExternalReferences,
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (3)
SymbolsTests\MetadataFileReferenceCompilationTests.vb (3)
66Assert.Equal(2, comp.ExternalReferences.Length) 74Assert.Equal(2, comp.ExternalReferences.Length) 79Assert.Equal(2, comp.ExternalReferences.Length)
Microsoft.CodeAnalysis.Workspaces (3)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (2)
550metadataReference = inProgressCompilationNotRef.ExternalReferences.FirstOrDefault( 572if (!Enumerable.SequenceEqual(compilationWithoutGeneratedDocuments.ExternalReferences, newReferences))
Workspace\Solution\SolutionCompilationState.RootedSymbolSet.cs (1)
75compilation.ExternalReferences.Length + compilation.DirectiveReferences.Length, out var secondarySymbols);
Microsoft.CodeAnalysis.Workspaces.UnitTests (13)
SolutionTests\SolutionTests.cs (3)
4009Assert.Empty(project.GetCompilationAsync().Result.ExternalReferences); 4037Assert.Equal(2, project2.GetCompilationAsync().Result.ExternalReferences.Length); 4066Assert.Single(project2.GetCompilationAsync().Result.ExternalReferences);
WorkspaceTests\WorkspaceReferenceTests.cs (10)
33var references1 = compilation1.ExternalReferences; 41var references2 = compilation2.ExternalReferences; 73var references1 = compilation1.ExternalReferences; 81var references2 = compilation2.ExternalReferences; 113var references1 = compilation1.ExternalReferences; 121var references2 = compilation2.ExternalReferences; 153var references1 = compilation1.ExternalReferences; 165var references2 = compilation2.ExternalReferences; 186var references1 = compilation1.ExternalReferences; 195var references2 = compilation2.ExternalReferences;
Microsoft.Maui.Controls.SourceGen (4)
CodeBehindGenerator.cs (4)
780 if (x.ExternalReferences.Length != y.ExternalReferences.Length) 785 return x.ExternalReferences.OfType<PortableExecutableReference>().SequenceEqual(y.ExternalReferences.OfType<PortableExecutableReference>());