49 references to AddReferences
Microsoft.AspNetCore.App.Analyzers.Test (1)
Infrastructure\WellKnownTypesTests.cs (1)
78compilation = compilation.AddReferences(references);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
SymbolKey\SymbolKeyErrorTypeTests.cs (1)
388.AddReferences(sourceCompilation.EmitToImageReference());
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (3)
Emit\NoPiaEmbedTypes.cs (3)
3124CompileAndVerify(compilation1.AddReferences(dispIdDefinition), symbolValidator: metadataValidator).VerifyDiagnostics(); 3131CompileAndVerify(compilation2.AddReferences(dispIdDefinition), symbolValidator: metadataValidator).VerifyDiagnostics(); 3202CompileAndVerify(compilation1.AddReferences(empty), symbolValidator: metadataValidator);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (37)
Compilation\CompilationAPITests.cs (19)
499comp = comp.AddReferences(ref1); 520compCollection = compCollection.AddReferences(ref1, ref2, ref3, ref4).RemoveReferences(hs); 530compCollection = compCollection.AddReferences(ref1, ref2, ref3).RemoveReferences(col); 541compCollection = compCollection.AddReferences(ref2, ref1, ref3).RemoveReferences(stack); 552compCollection = compCollection.AddReferences(ref2, ref1, ref3).RemoveReferences(queue); 957Assert.Throws<ArgumentException>(() => comp = comp.AddSyntaxTrees(listSyntaxTree).AddReferences().ReplaceSyntaxTree(t1, t2)); 958comp = comp.AddSyntaxTrees(t1).AddReferences().ReplaceSyntaxTree(t1, t2); 1171comp = comp.AddReferences(item); 1202comp = comp.AddReferences(ref1); 1219comp = comp.AddReferences(modRef1); 1297Assert.Throws<ArgumentException>(() => comp.AddReferences(compRef)); 1382Assert.Throws<ArgumentException>(() => comp.AddReferences(compRef)); 1416comp = comp.AddReferences(ref1, ref1); 1424comp = comp.AddReferences(listRef).AddReferences(ref2).RemoveReferences(ref1, ref3, ref4).ReplaceReference(ref2, ref2); 1428Assert.Throws<ArgumentException>(() => comp.AddReferences(listRef).AddReferences(ref2).RemoveReferences(ref1, ref2, ref3, ref4).ReplaceReference(ref2, ref2)); 1440comp = comp.AddReferences(ref1); 2050c3 = c2.AddReferences(SystemCoreRef); 2351comp = comp.AddReferences(metadata); 2357comp2 = comp2.AddReferences(metadata);
Symbols\CompilationCreationTests.cs (2)
2620c = c.AddReferences(mscorlibRef); 2623c = c.AddReferences(systemCoreRef);
Symbols\ConversionTests.cs (1)
387.AddReferences(MscorlibRef)
Symbols\DefaultInterfaceImplementationTests.cs (3)
45905compilation2 = compilation2.AddReferences(refs.comp0); 45923compilation3 = compilation3.AddReferences(refs.comp1); 45938compilation4 = compilation4.AddReferences(refs.comp1);
Symbols\Source\ExternAliasTests.cs (12)
88comp = comp.AddReferences(Goo1, Goo2); 101comp = comp.AddReferences(Goo1, Goo2); 140comp = comp.AddReferences(Goo1, Goo2); 160comp = comp.AddReferences(Goo1, Goo2); 188comp = comp.AddReferences(Goo1); 230comp = comp.AddReferences(goo1); 244comp = comp.AddReferences(goo2, goo1Alias); 266comp = comp.AddReferences(Goo1); 290comp = comp.AddReferences(Goo1); 331comp = comp.AddReferences(goo1Alias); 352comp = comp.AddReferences(Goo1); 384var comp = CreateCompilation(text).AddReferences(Goo1);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
CodeGeneration\AddImportsTests.cs (1)
838.AddReferences(NetFramework.mscorlib);
CodeGeneration\SyntaxGeneratorTests.cs (3)
44.AddReferences(NetFramework.mscorlib, NetFramework.System, NetFramework.SystemCore, NetFramework.SystemRuntime, NetFramework.SystemValueTuple) 2558compilation = _emptyCompilation.AddReferences(reference); 3999.AddReferences(NetFramework.mscorlib)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Compilation\CompilationAPITests.vb (1)
1038csComp = csComp.AddReferences(SystemRef)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
UtilityTest\DocumentationCommentIdTests.cs (1)
20return CSharpCompilation.Create("goo.exe").AddReferences(NetFramework.mscorlib).AddSyntaxTrees(syntaxTree);
WinShimmer (1)
Program.cs (1)
45.AddReferences(