563 instantiations of CSharpCompilationReference
Microsoft.CodeAnalysis.CSharp (2)
Compilation\CSharpCompilation.cs (1)
1187return new CSharpCompilationReference(this, aliases, embedInteropTypes);
Compilation\CSharpCompilationReference.cs (1)
51return new CSharpCompilationReference(Compilation, properties);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
SymbolKey\SymbolKeyMetadataVsSourceTests.cs (3)
63var comp2 = (Compilation)CreateCompilation(src2, new MetadataReference[] { new CSharpCompilationReference(comp1) }); 330var comp40 = CreateCompilation(src2, new[] { new CSharpCompilationReference(comp20) }); 412var comp40 = CreateCompilation(src2, new[] { new CSharpCompilationReference(comp20) });
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (170)
BreakingChanges.cs (1)
92var comp = CreateCompilation(source2, new[] { new CSharpCompilationReference(compilation1) });
CodeGen\CodeGenDynamicTests.cs (2)
7466new[] { new CSharpCompilationReference(lib), SystemCoreRef, CSharpRef }); 7563new[] { new CSharpCompilationReference(lib), SystemCoreRef, CSharpRef },
CodeGen\CodeGenExplicitImplementationTests.cs (7)
222new CSharpCompilationReference(comp1) 378references: new MetadataReference[] { asm01, new CSharpCompilationReference(comp1) }, 996var comp = CreateCompilation(source, new[] { new CSharpCompilationReference(libComp, aliases: ImmutableArray.Create("Q")) }); 1045var comp1 = CreateCompilation(source, new[] { new CSharpCompilationReference(libComp1, aliases: ImmutableArray.Create("A")), new CSharpCompilationReference(libComp1, aliases: ImmutableArray.Create("B")) }); 1061var comp2 = CreateCompilation(source, new[] { new CSharpCompilationReference(libComp1, aliases: ImmutableArray.Create("A")), new CSharpCompilationReference(libComp2, aliases: ImmutableArray.Create("B")) });
CodeGen\CodeGenFieldInitTests.cs (1)
701CreateCompilation(source2, new[] { new CSharpCompilationReference(compilation1) }, assemblyName: "2110a705-cc34-430b-9450-ca37031aa828")
CodeGen\CodeGenImplicitImplementationTests.cs (1)
2296var exeComp = CreateCompilation(exeSource, options: TestOptions.ReleaseExe, references: new[] { new CSharpCompilationReference(libComp) });
CodeGen\CodeGenInterfaceImplementation.cs (2)
370references: new MetadataReference[] { asmRef, new CSharpCompilationReference(comp1), new CSharpCompilationReference(comp2) },
CodeGen\CodeGenOverridingAndHiding.cs (17)
2260var comp = CompileAndVerify(source2, new[] { new CSharpCompilationReference(compilation1) }, expectedSignatures: new[] 2541new[] { new CSharpCompilationReference(referencedCompilation) }, 2831refs.Add(new CSharpCompilationReference(comp1)); 2924refs.Add(new CSharpCompilationReference(comp1)); 2989references: new MetadataReference[] { asm01, asm02, new CSharpCompilationReference(comp1) }, 3165refs.Add(new CSharpCompilationReference(comp1)); 3170refs.Add(new CSharpCompilationReference(comp2)); 3378references: new MetadataReference[] { asm01, asm02, new CSharpCompilationReference(comp1) }, 3383references: new MetadataReference[] { asm01, asm02, new CSharpCompilationReference(comp1), new CSharpCompilationReference(comp2) }, 3487references: new MetadataReference[] { asmfile, new CSharpCompilationReference(comp1), new CSharpCompilationReference(comp2) }, 4175var comp = CompileAndVerify(source2, references: new[] { new CSharpCompilationReference(compref) }, expectedOutput: "M"); 4380var B = CreateCompilation(@"public interface B { void M(A a); }", references: new[] { new CSharpCompilationReference(A) }, assemblyName: "B"); 4381var C = CreateCompilation(@"public class C { public void M(A a) { } }", references: new[] { new CSharpCompilationReference(A) }, assemblyName: "C"); 4383var D = CreateCompilation(@"public class D : C, B { }", references: new[] { new CSharpCompilationReference(B), new CSharpCompilationReference(C) }, assemblyName: "D");
CodeGen\CodeGenTests.cs (1)
11784CompileAndVerify(source2, new[] { new CSharpCompilationReference(compilation1) }).VerifyIL("Test.Main", @"
CodeGen\CodeGenTupleTest.cs (13)
4227new CSharpCompilationReference(comp1), 4228new CSharpCompilationReference(comp2), 4271var comp = CreateCompilation(source, references: new[] { new CSharpCompilationReference(comp1), new CSharpCompilationReference(comp2) }, options: TestOptions.ReleaseExe); 4314var comp = CreateCompilationWithMscorlib40(source, references: new[] { new CSharpCompilationReference(comp1), new CSharpCompilationReference(comp2) }); 4337var comp = CreateCompilationWithMscorlib40(source, references: new[] { new CSharpCompilationReference(comp1), new CSharpCompilationReference(comp2) }); 4361references: new[] { new CSharpCompilationReference(comp1), 4362new CSharpCompilationReference(comp2) }); 4421var comp = CompileAndVerifyWithMscorlib40(source, expectedOutput: @"1 1 2 2 3 3 4 4 5 5 6 6 True", references: new[] { new CSharpCompilationReference(comp1), new CSharpCompilationReference(comp2) }); 19778var comp3 = CreateCompilationWithMscorlib46(source2, references: new[] { new CSharpCompilationReference(comp2) });
Emit\CompilationEmitTests.cs (4)
4676var compRef = new CSharpCompilationReference(refCompilation); 4806var compRef = new CSharpCompilationReference(refCompilation); 4893var compRef = new CSharpCompilationReference(refCompilation); 4970var compRef = new CSharpCompilationReference(refCompilation);
Emit\DeterministicTests.cs (3)
300var forwardedToReference1 = new CSharpCompilationReference(forwardedToCompilation1); 318var forwardingReference = new CSharpCompilationReference(forwardingCompilation); 353var forwardedToReference2 = new CSharpCompilationReference(forwardedToCompilation2);
Emit\EmitErrorTests.cs (4)
117new[] { new CSharpCompilationReference(compilation1) }, 151new[] { new CSharpCompilationReference(compilation1) }, 190new[] { new CSharpCompilationReference(compilation1) }, 237var compilation2 = CreateCompilation(source2, new MetadataReference[] { new CSharpCompilationReference(compilation1) });
Emit\NoPiaEmbedTypes.cs (89)
71references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 116references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 193references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 262references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 322references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 373references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 423references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 472references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 522references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 572references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 622references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 672references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 722references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 821var compilation = CreateEmptyCompilation(consumer, new MetadataReference[] { MscorlibRef_v20, new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }, options: TestOptions.ReleaseExe); 871var compilation = CreateEmptyCompilation(consumer, new MetadataReference[] { MscorlibRef_v20, new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }, options: TestOptions.DebugExe); 1162references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 1721references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 1826references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 1913references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 2000new MetadataReference[] { MscorlibRef_v4_0_30316_17626, new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }, 2064references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 2131references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 2189references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 2305references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 2390references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 2471references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 2534references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 2698references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 2770references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 2834references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 2895references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 2961references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3027references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3092references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3157references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3225references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3375references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3440references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3497references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3544references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3625references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation1, embedInteropTypes: true), 3626new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 3690references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3766references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: false) }, assemblyName: "Consumer1"); 3772references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true), 3773new CSharpCompilationReference(compilation1, embedInteropTypes: false) }); 3778references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true), 3785new CSharpCompilationReference(compilation1, embedInteropTypes: false) }); 3862references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: false) }, assemblyName: "Consumer1"); 3868references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true), 3869new CSharpCompilationReference(compilation1, embedInteropTypes: false) }); 3874references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true), 3881new CSharpCompilationReference(compilation1, embedInteropTypes: false) }); 3942references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 4026references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 4103references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 4168references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 4233references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true), CSharpRef }); 4293references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true), CSharpRef }); 4353references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true), CSharpRef }); 4419references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true), CSharpRef }); 4477references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation1, embedInteropTypes: true) }); 4500references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 4546references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation1, embedInteropTypes: true) }); 4571references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 4589references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2) }); 4646references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation1, embedInteropTypes: true) }); 4672references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 4680references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2) }); 4727references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation1, embedInteropTypes: true) }); 4750references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 4798references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation1, embedInteropTypes: true) }); 4822references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 4866references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 4914references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 4965references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation1, embedInteropTypes: true) }); 4988references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 4996references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2) }); 5123references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation1, embedInteropTypes: true) }); 5149references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 5157references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2) }); 5314var NetImpl_1_Compilation = CreateCompilation(NetImpl_cs, new[] { new CSharpCompilationReference(IEvent_Compilation, embedInteropTypes: true) }, options: TestOptions.ReleaseDll, assemblyName: "NetImpl"); 5364MetadataReference[] NetImpl_refs = new MetadataReference[] { new CSharpCompilationReference(NetImpl_1_Compilation), 5365new CSharpCompilationReference(NetImpl_2_Compilation), 5369MetadataReference[] IEvent_refs = new MetadataReference[] { new CSharpCompilationReference(IEvent_Compilation), 5370new CSharpCompilationReference(IEvent_Compilation, embedInteropTypes: true), 5421references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 5489var piaRef1 = new CSharpCompilationReference(piaCompilation, embedInteropTypes: true); 5605references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) });
Emit\OptionalArgumentsTests.cs (1)
175references: new[] { new CSharpCompilationReference(comp1) },
PDB\PDBUsingTests.cs (19)
577new CSharpCompilationReference(dummyCompilation1, ImmutableArray.Create("P")) , 578new CSharpCompilationReference(dummyCompilation2, ImmutableArray.Create("Q")), 579new CSharpCompilationReference(dummyCompilation3, ImmutableArray.Create("R")) 793new CSharpCompilationReference(dummyCompilation, ImmutableArray.Create("A", "A")), 873new CSharpCompilationReference(dummyCompilation1, ImmutableArray.Create("global", "A")), 874new CSharpCompilationReference(dummyCompilation2, ImmutableArray.Create("B", "global")) 944references: new[] { new CSharpCompilationReference(libComp, ImmutableArray.Create("P")) }); 1020new CSharpCompilationReference(dummyCompilation1, ImmutableArray.Create("P")) , 1021new CSharpCompilationReference(dummyCompilation2, ImmutableArray.Create("Q")), 1022new CSharpCompilationReference(dummyCompilation3, ImmutableArray.Create("R")) 1176new CSharpCompilationReference(compilation1, ImmutableArray.Create("A", "B")) 1244new CSharpCompilationReference(compilation1, ImmutableArray.Create("global", "B", "A", "A", "global")) 1326new CSharpCompilationReference(dummyCompilation1, ImmutableArray.Create("P")), 1327new CSharpCompilationReference(dummyCompilation2, ImmutableArray.Create("Q")), 1328new CSharpCompilationReference(dummyCompilation3, ImmutableArray.Create("R")), 1504new CSharpCompilationReference(dummyCompilation1, ImmutableArray.Create("P")), 1505new CSharpCompilationReference(dummyCompilation2, ImmutableArray.Create("Q")), 1506new CSharpCompilationReference(dummyCompilation3, ImmutableArray.Create("R")), 1507new CSharpCompilationReference(dummyCompilation4, ImmutableArray.Create("S")),
PrivateProtected.cs (5)
138references: new[] { new CSharpCompilationReference(baseCompilation) }, 241references: new[] { new CSharpCompilationReference(baseCompilation) }, 708references: new[] { new CSharpCompilationReference(compilation1) }) 734references: new[] { new CSharpCompilationReference(compilation1) }) 761references: new[] { new CSharpCompilationReference(compilation1) })
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (46)
Attributes\AttributeTests.cs (4)
9652var compilation2 = CreateCompilation(source2, new[] { new CSharpCompilationReference(compilation1) }); 9671var compilation3 = CreateCompilation(source3, new[] { new CSharpCompilationReference(compilation1) }); 9734var compilation2 = CreateCompilationWithMscorlib40(source2, new[] { new CSharpCompilationReference(compilation1) }, options: TestOptions.DebugDll, assemblyName: "Test.dll"); 9745var compilation3 = CreateCompilationWithMscorlib45(source2, new[] { new CSharpCompilationReference(compilation1) }, options: TestOptions.DebugDll);
Attributes\AttributeTests_Assembly.cs (3)
377var neutralRef = new CSharpCompilationReference(neutral); 387var deRef = new CSharpCompilationReference(de); 397var en_usRef = new CSharpCompilationReference(en_us);
Attributes\AttributeTests_Experimental.cs (1)
104var comp2B = CreateCompilation(source2, new[] { new CSharpCompilationReference(comp1) });
Attributes\AttributeTests_WellKnownAttributes.cs (10)
565var libCompRef = new CSharpCompilationReference(libComp); 977", new[] { new CSharpCompilationReference(c1) }); 5184var compref1 = new CSharpCompilationReference(comp1); 5186var comp3 = CreateCompilation(text3, references: new[] { compref1, new CSharpCompilationReference(comp2) }, options: opt, assemblyName: "Child2"); 5190comp3 = CreateCompilation(text3, references: new[] { compref1, new CSharpCompilationReference(comp2) }, options: opt, assemblyName: "Child2"); 6673CreateCompilation(s, new[] { new CSharpCompilationReference(other) }).VerifyDiagnostics( 9756var compilation2 = CreateEmptyCompilation(source2, WinRtRefs.Concat(new[] { new CSharpCompilationReference(compilation1) }), TestOptions.ReleaseDll); 9892var compilation3 = CreateCompilationWithMscorlib40AndSystemCore(source2, new[] { new CSharpCompilationReference(compilation1) }); 9975var compilation3 = CreateCompilationWithMscorlib40AndSystemCore(source2, new[] { new CSharpCompilationReference(compilation1) }); 10126var compilation2 = CreateEmptyCompilation(source2, WinRtRefs.Concat(new[] { new CSharpCompilationReference(compilation1) }), TestOptions.ReleaseDll);
Attributes\InternalsVisibleToAndStrongNameTests.cs (24)
758new[] { new CSharpCompilationReference(other) }, 782new[] { new CSharpCompilationReference(other) }, 863new MetadataReference[] { new CSharpCompilationReference(other) }, 892references: new[] { new CSharpCompilationReference(other) }, 1051new[] { new CSharpCompilationReference(other) }, 1081new[] { new CSharpCompilationReference(other) }, 1110new[] { new CSharpCompilationReference(other) }, 1141new MetadataReference[] { new CSharpCompilationReference(other) }, 1176new MetadataReference[] { new CSharpCompilationReference(other) }, 1216new MetadataReference[] { new CSharpCompilationReference(other) }, 1248new MetadataReference[] { new CSharpCompilationReference(other) }, 1284new MetadataReference[] { new CSharpCompilationReference(other) }, 1329new MetadataReference[] { new CSharpCompilationReference(giver) }, 2034var ref1 = new CSharpCompilationReference(comp1); 2038var ref2 = new CSharpCompilationReference(comp2); 2152var ref1 = new CSharpCompilationReference(comp1); 2156var ref2 = new CSharpCompilationReference(comp2); 2160var ref3 = new CSharpCompilationReference(comp3); 2318var ref1 = new CSharpCompilationReference(comp1); 2360CompileAndVerify(other.WithReferences(new[] { other.References.ElementAt(0), new CSharpCompilationReference(unsigned) })).VerifyDiagnostics(); 2388var comps = new[] {other.WithReferences(new []{other.References.ElementAt(0), new CSharpCompilationReference(unsigned)}), 2670references: new[] { new CSharpCompilationReference(ca) }, 2700var cb = CreateCompilation(sourceB, options: TestOptions.ReleaseExe, assemblyName: "X", references: new[] { new CSharpCompilationReference(ca) }, parseOptions: parseOptions); 2728var cb = CreateCompilation(sourceB, options: TestOptions.ReleaseExe, assemblyName: "X", references: new[] { new CSharpCompilationReference(ca) }, parseOptions: parseOptions);
FlowAnalysis\StructTests.cs (4)
234var sourceReference = new CSharpCompilationReference(comp1); 294var sourceReference = new CSharpCompilationReference(comp1); 327var sourceReference = new CSharpCompilationReference(comp1); 372var sourceReference = new CSharpCompilationReference(comp1);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (56)
Semantics\AccessCheckTests.cs (4)
630}", new List<MetadataReference>() { new CSharpCompilationReference(other) }); 680}", new[] { new CSharpCompilationReference(other) }); 994}", new MetadataReference[] { new CSharpCompilationReference(other) }, assemblyName: "AccessCheckCrossAssemblyParameterProtectedMethod2"); 1014}", new MetadataReference[] { new CSharpCompilationReference(other) }, assemblyName: "AccessCheckCrossAssemblyParameterProtectedMethod2");
Semantics\AmbiguousOverrideTests.cs (2)
131var comp1ref = new CSharpCompilationReference(comp1); 135var comp2ref = new CSharpCompilationReference(comp2);
Semantics\BindingTests.cs (12)
1562CSharpCompilation comp2 = CreateCompilationWithMscorlib45(source2, new MetadataReference[] { new CSharpCompilationReference(comp1, embedInteropTypes: true) }, assemblyName: "Bar948674_1"); 1573CSharpCompilation comp3 = CreateCompilationWithMscorlib45(source3, new MetadataReference[] { new CSharpCompilationReference(comp2), new CSharpCompilationReference(comp1, embedInteropTypes: true) }); 1615CSharpCompilation comp2 = CreateCompilationWithMscorlib45(source2, new MetadataReference[] { new CSharpCompilationReference(comp1, embedInteropTypes: true) }, assemblyName: "Bar948674_2"); 1626CSharpCompilation comp3 = CreateCompilationWithMscorlib45(source3, new MetadataReference[] { new CSharpCompilationReference(comp2), new CSharpCompilationReference(comp1, embedInteropTypes: true) }); 1671CSharpCompilation comp2 = CreateCompilationWithMscorlib45(source2, new MetadataReference[] { new CSharpCompilationReference(comp1, embedInteropTypes: true) }, assemblyName: "Bar948674_3"); 1680CSharpCompilation comp3 = CreateCompilationWithMscorlib45(source3, new MetadataReference[] { new CSharpCompilationReference(comp2), new CSharpCompilationReference(comp1, embedInteropTypes: true) }); 1719CSharpCompilation comp2 = CreateCompilationWithMscorlib45(source2, new MetadataReference[] { new CSharpCompilationReference(comp1, embedInteropTypes: true) }, assemblyName: "Bar948674_4"); 1728CSharpCompilation comp3 = CreateCompilationWithMscorlib45(source3, new MetadataReference[] { new CSharpCompilationReference(comp2), new CSharpCompilationReference(comp1, embedInteropTypes: true) });
Semantics\ColorColorTests.cs (2)
2104new CSharpCompilationReference(refLib), 2147new CSharpCompilationReference(refLib),
Semantics\ConstantTests.cs (4)
2845var compilation2 = CreateCompilation(source2, new MetadataReference[] { new CSharpCompilationReference(compilation1) }); 2886var reference1 = new CSharpCompilationReference(compilation1); 2888var reference2 = new CSharpCompilationReference(compilation2); 2890var reference3 = new CSharpCompilationReference(compilation3);
Semantics\ImplicitObjectCreationTests.cs (3)
4402new[] { new CSharpCompilationReference(libBv1) }, 4418var comp = CreateCompilation(source, new[] { new CSharpCompilationReference(libAv1), new CSharpCompilationReference(libBv2) },
Semantics\InheritanceBindingTests.cs (3)
6217CreateCompilation(text2, new[] { new CSharpCompilationReference(comp1) }).VerifyDiagnostics( 6255var comp = CreateCompilation(source2, new[] { new CSharpCompilationReference(compilation1) }); 8237var refs = new List<MetadataReference>(baseCompilations.Select(c => new CSharpCompilationReference(c)));
Semantics\InitOnlyMemberTests.cs (1)
4600new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) },
Semantics\LambdaTests.cs (2)
385new[] { new CSharpCompilationReference(comp1) }); 434new CSharpCompilationReference(comp1),
Semantics\NamedAndOptionalTests.cs (1)
1679var exeComp = CreateCompilation(main, new[] { new CSharpCompilationReference(libComp) }, options: TestOptions.ReleaseExe, assemblyName: "Main");
Semantics\NullableReferenceTypesTests.cs (10)
8801var compRefs0 = new MetadataReference[] { new CSharpCompilationReference(comp0) }; 8824compRefs0 = new MetadataReference[] { new CSharpCompilationReference(comp0) }; 8854compRefs0 = new MetadataReference[] { new CSharpCompilationReference(comp0) }; 8933var comp1A = CreateCompilation(source1, references: new MetadataReference[] { new CSharpCompilationReference(comp0) }); 8983var comp1A = CreateCompilation(source1, references: new[] { new CSharpCompilationReference(comp0) }); 9147references: new MetadataReference[] { new CSharpCompilationReference(comp0) }); 9415var comp1 = CreateCompilation(source1, references: new MetadataReference[] { new CSharpCompilationReference(comp0) }); 73275new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }, 107922var comp = CreateCompilation(new[] { source }, options: WithNullableEnable(), references: new[] { new CSharpCompilationReference(comp0) }); 107940comp = CreateCompilation(new[] { source }, options: WithNullableEnable(), references: new[] { new CSharpCompilationReference(comp0) });
Semantics\OverloadResolutionTests.cs (2)
2308", new MetadataReference[] { new CSharpCompilationReference(cCommon) }, assemblyName: "cCS"); 2332new MetadataReference[] { new CSharpCompilationReference(cCommon) });
Semantics\StructsTests.cs (2)
382new[] { MscorlibRef, new CSharpCompilationReference(c1) }, 385var c1AsmRef = c2.GetReferencedAssemblySymbol(new CSharpCompilationReference(c1));
Semantics\UseSiteErrorTests.cs (8)
1050new[] { MscorlibRef, new CSharpCompilationReference(lib1) }, 1083var main = CreateCompilation(mainSource, new[] { new CSharpCompilationReference(lib) }, assemblyName: "Main"); 1115var main = CreateCompilation(mainSource, new[] { new CSharpCompilationReference(lib) }, assemblyName: "Main"); 1144var main = CreateCompilation(mainSource, new[] { new CSharpCompilationReference(lib) }, assemblyName: "Main"); 1241var derivedLib = CreateCompilation(derivedSource, assemblyName: "DerivedAssembly", references: new[] { new CSharpCompilationReference(baseLib) }); 1257CreateCompilation(programSource, references: new[] { new CSharpCompilationReference(derivedLib) }).VerifyDiagnostics( 2185CSharpCompilation comp2 = CreateCompilation(source2, new MetadataReference[] { new CSharpCompilationReference(comp1) }); 2203CSharpCompilation comp3 = CreateCompilation(source3, new MetadataReference[] { new CSharpCompilationReference(comp2) });
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (284)
BadSymbolReference.cs (12)
464var compilation3 = CreateCompilation(a_cs, new MetadataReference[] { new CSharpCompilationReference(cl3Compilation) }); 470var compilation4 = CreateCompilation(a_cs, new MetadataReference[] { new CSharpCompilationReference(cl3BadCompilation1) }); 601var compilation5 = CreateCompilation(a_cs, new MetadataReference[] { new CSharpCompilationReference(cl3BadCompilation2) }); 842var lib1Ref = new CSharpCompilationReference(lib1); 852var lib2Ref = new CSharpCompilationReference(lib2); 867var lib3Ref = new CSharpCompilationReference(lib3); 1031var lib1Ref = new CSharpCompilationReference(lib1); 1053var lib2Ref = new CSharpCompilationReference(lib2); 1079var lib3Ref = new CSharpCompilationReference(lib3); 1316var lib1Ref = new CSharpCompilationReference(lib1); 1325var lib2Ref = new CSharpCompilationReference(lib2); 1334var lib3Ref = new CSharpCompilationReference(lib3);
Compilation\GetUnusedImportDirectivesTests.cs (1)
347var comp = CreateCompilation(source, new[] { new CSharpCompilationReference(lib, aliases: ImmutableArray.Create("A")) });
Compilation\ReferenceManagerTests.cs (49)
70var testRefV1 = CreateCompilation("public class E : D { }", new MetadataReference[] { new CSharpCompilationReference(refV1), v2 }, assemblyName: "testRefV1"); 73var testRefV2 = CreateCompilation("public class E : D { }", new MetadataReference[] { new CSharpCompilationReference(refV2), v1 }, assemblyName: "testRefV2"); 112var testRefV1 = CreateCompilation("public class E { }", new MetadataReference[] { new CSharpCompilationReference(refV1), v2 }); 115var testRefV2 = CreateCompilation("public class E { }", new MetadataReference[] { new CSharpCompilationReference(refV2), v1 }); 165references: new[] { new CSharpCompilationReference(libV2) }, 185new CSharpCompilationReference(libV1), 186new CSharpCompilationReference(libV3), 187new CSharpCompilationReference(refLibV2) 205new CSharpCompilationReference(libV3), 206new CSharpCompilationReference(libV1), 207new CSharpCompilationReference(refLibV2) 297references: new[] { new CSharpCompilationReference(libV1) }, 310references: new[] { new CSharpCompilationReference(refLibV1), new CSharpCompilationReference(libV1) }, 346references: new[] { new CSharpCompilationReference(refLibV1), new CSharpCompilationReference(libV2), new CSharpCompilationReference(x) }); 452references: new[] { new CSharpCompilationReference(a1), new CSharpCompilationReference(b2) }, 469references: new[] { new CSharpCompilationReference(refA1B2), new CSharpCompilationReference(a2), new CSharpCompilationReference(b1) }); 559references: new MetadataReference[] { MinCorlibRef, new CSharpCompilationReference(libV1) }, 573references: new MetadataReference[] { MinCorlibRef, new CSharpCompilationReference(refLibV1), new CSharpCompilationReference(libV2) }); 617references: new[] { new CSharpCompilationReference(libV1) }, 632references: new[] { new CSharpCompilationReference(refLibV1), new CSharpCompilationReference(libV2) }); 689references: new[] { new CSharpCompilationReference(libV1) }, 707references: new MetadataReference[] { MetadataReference.CreateFromImage(refLibV1.EmitToArray()), new CSharpCompilationReference(libV2) }, 1095new[] { new CSharpCompilationReference(libV1) }, 1099new[] { new CSharpCompilationReference(libV1), new CSharpCompilationReference(refLibV1), new CSharpCompilationReference(libV2) }, 1393var b = CreateCompilation(sourceB, new[] { new CSharpCompilationReference(a) }, assemblyName: "B"); 1440var b = CreateCompilation("public class B : A { } ", new[] { new CSharpCompilationReference(a) }, assemblyName: "B"); 1889var r1 = new CSharpCompilationReference(pl); 1927new[] { new CSharpCompilationReference(libBv1) }, 1942var comp = CreateCompilation(source, new[] { new CSharpCompilationReference(libAv1), new CSharpCompilationReference(libBv2) }); 1971new[] { new CSharpCompilationReference(libBv1) }, 1986var comp = CreateCompilation(source, new[] { new CSharpCompilationReference(libAv1), new CSharpCompilationReference(libBv2) }); 2013var libAv1 = CreateCompilation(libASource, new[] { new CSharpCompilationReference(libBv1) }, assemblyName: "A", options: s_signedDll); 2026var comp = CreateCompilation(source, new[] { new CSharpCompilationReference(libAv1), new CSharpCompilationReference(libBv2) }); 2087var libAv1 = CreateCompilation(libASource, new[] { new CSharpCompilationReference(libBv1) }, assemblyName: "A", options: s_signedDll); 2101var comp = CreateCompilation(source, new[] { new CSharpCompilationReference(libAv1), new CSharpCompilationReference(libBv2) });
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
3100var ref1 = new CSharpCompilationReference(comp1); 3964var c2 = CreateCompilation(tree2, references: new[] { new CSharpCompilationReference(c1) });
Compilation\SemanticModelGetSemanticInfoTests.cs (1)
14989}", references: new[] { new CSharpCompilationReference(pia, embedInteropTypes: true) });
DocumentationComments\CrefTests.cs (9)
2000var compilation = CreateCompilationWithMscorlib40AndDocumentationComments(source, new[] { new CSharpCompilationReference(lib1), new CSharpCompilationReference(lib2) }); 2042var compilation = CreateCompilationWithMscorlib40AndDocumentationComments(source, new[] { new CSharpCompilationReference(lib1), new CSharpCompilationReference(lib2) }); 2093var compilation = CreateCompilationWithMscorlib40AndDocumentationComments(source, new[] { new CSharpCompilationReference(lib1), new CSharpCompilationReference(lib2) }); 2135var compilation = CreateCompilationWithMscorlib40AndDocumentationComments(source, new[] { new CSharpCompilationReference(lib, aliases: ImmutableArray.Create("LibAlias")) }); 2165var compilation = CreateCompilationWithMscorlib40AndDocumentationComments(source, new[] { new CSharpCompilationReference(lib, aliases: ImmutableArray.Create("LibAlias")) }); 2195var compilation = CreateCompilationWithMscorlib40AndDocumentationComments(source, new[] { new CSharpCompilationReference(lib, aliases: ImmutableArray.Create("LibAlias")) });
SymbolDisplay\SymbolDisplayTests.cs (1)
4424var compref = new CSharpCompilationReference(complib);
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (3)
199var comp1ref = new CSharpCompilationReference(comp1); 203var comp2ref = new CSharpCompilationReference(comp2); 860var compref = new CSharpCompilationReference(comp0);
Symbols\AssemblyAndNamespaceTests.cs (6)
119var compRef = new CSharpCompilationReference(comp1); 162var compRef = new CSharpCompilationReference(comp1); 205var compRef1 = new CSharpCompilationReference(comp1); 206var compRef2 = new CSharpCompilationReference(comp2); 254var compRef1 = new CSharpCompilationReference(comp1); 255var compRef2 = new CSharpCompilationReference(comp2);
Symbols\CompilationCreationTests.cs (29)
1434new CSharpCompilationReference(varC_MTTestLib2) 1473new CSharpCompilationReference(varC_MTTestLib2), 1490new CSharpCompilationReference(varC_MTTestLib2), 1491new CSharpCompilationReference(varC_MTTestLib3) 1558new CSharpCompilationReference(varC_MTTestLib2), 1559new CSharpCompilationReference(varC_MTTestLib3), 1577new CSharpCompilationReference(varC_MTTestLib2), 1578new CSharpCompilationReference(varC_MTTestLib3), 1579new CSharpCompilationReference(varC_MTTestLib4) 1681new CSharpCompilationReference(varC_MTTestLib3) 1693new CSharpCompilationReference(varC_MTTestLib2) 1705new CSharpCompilationReference(varC_MTTestLib2), 1706new CSharpCompilationReference(varC_MTTestLib3), 1707new CSharpCompilationReference(varC_MTTestLib4) 1782new CSharpCompilationReference(varC_MTTestLib4), 1783new CSharpCompilationReference(varC_MTTestLib2), 1784new CSharpCompilationReference(varC_MTTestLib3) 1801new CSharpCompilationReference(varC_MTTestLib4) 1814new CSharpCompilationReference(varC_MTTestLib2), 1815new CSharpCompilationReference(varC_MTTestLib3), 1816new CSharpCompilationReference(varC_MTTestLib4) 2234new CSharpCompilationReference(localC1_V1), 2235new CSharpCompilationReference(localC4_V1), 2236new CSharpCompilationReference(c7) 2255new CSharpCompilationReference(c3), 2256new CSharpCompilationReference(localC1_V2), 2257new CSharpCompilationReference(localC4_V2), 2258new CSharpCompilationReference(c7) 2561new CSharpCompilationReference(c1)
Symbols\CorLibrary\Choosing.cs (2)
49", new[] { new CSharpCompilationReference(corLib) }, options: TestOptions.ReleaseDll); 70", new[] { new CSharpCompilationReference(corLib) }, options: TestOptions.ReleaseDll);
Symbols\CustomModifiersTests.cs (1)
1525var compilation2 = CreateCompilationWithMscorlib45(new SyntaxTree[] { }, references: new[] { new CSharpCompilationReference(compilation1) });
Symbols\ExtensionMethodTests.cs (3)
2848var compilation2 = CreateCompilation(source2, references: new[] { new CSharpCompilationReference(compilation1) }, parseOptions: TestOptions.Regular8); 2867compilation2 = CreateCompilation(source2, references: new[] { new CSharpCompilationReference(compilation1) }, parseOptions: TestOptions.Regular7); 3109var libReference = new CSharpCompilationReference(libCompilation);
Symbols\GenericConstraintTests.cs (4)
3079var compilation2 = CreateCompilation(source2, assemblyName: "d03a3229-eb22-4682-88df-77efaa348e3b", references: new MetadataReference[] { new CSharpCompilationReference(compilation1) }); 3095var compilation3 = CreateCompilation(source3, references: new MetadataReference[] { new CSharpCompilationReference(compilation2) }); 6442var compilation2 = CreateCompilation(source2, references: new MetadataReference[] { new CSharpCompilationReference(compilation1) }); 6446var compilation3 = CreateCompilation(source3, references: new MetadataReference[] { new CSharpCompilationReference(compilation2) });
Symbols\IndexerTests.cs (1)
2833var comp2 = CreateCompilation(src2, new[] { new CSharpCompilationReference(comp1) });
Symbols\InterfaceImplementationTests.cs (8)
234var comp1ref = new CSharpCompilationReference(comp1); 238var comp2ref = new CSharpCompilationReference(comp2); 306var comp1ref = new CSharpCompilationReference(comp1); 310var comp2ref = new CSharpCompilationReference(comp2); 420var comp1ref = new CSharpCompilationReference(comp1); 424var comp2ref = new CSharpCompilationReference(comp2); 973references: new MetadataReference[] { new CSharpCompilationReference(comp1) }, 1894var ref1 = new CSharpCompilationReference(comp1);
Symbols\Metadata\PE\NoPia.cs (16)
654new CSharpCompilationReference(localTypes1) 667new CSharpCompilationReference(localTypes1)); 1108var pia5Link = new CSharpCompilationReference(varC_Pia5, embedInteropTypes: true); 1109var pia5Ref = new CSharpCompilationReference(varC_Pia5, embedInteropTypes: false); 1116var pia1Link = new CSharpCompilationReference(varC_Pia1, embedInteropTypes: true); 1117var pia1Ref = new CSharpCompilationReference(varC_Pia1, embedInteropTypes: false); 1124var library2Ref = new CSharpCompilationReference(varC_Library2, embedInteropTypes: false); 1125var library2Link = new CSharpCompilationReference(varC_Library2, embedInteropTypes: true); 1269var varALink = new CSharpCompilationReference(varC_A, embedInteropTypes: true); 1270var varARef = new CSharpCompilationReference(varC_A, embedInteropTypes: false); 1274var varBLink = new CSharpCompilationReference(varC_B, embedInteropTypes: true); 1275var varBRef = new CSharpCompilationReference(varC_B, embedInteropTypes: false); 1279var varCLink = new CSharpCompilationReference(varC_C, embedInteropTypes: true); 1280var varCRef = new CSharpCompilationReference(varC_C, embedInteropTypes: false); 1284var varDLink = new CSharpCompilationReference(varC_D, embedInteropTypes: true); 1285var varDRef = new CSharpCompilationReference(varC_D, embedInteropTypes: false);
Symbols\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.cs (1)
561new CSharpCompilationReference(localType)
Symbols\Metadata\PE\NoPiaLocalHideAndTypeSubstitutionTests.cs (7)
83new CSharpCompilationReference(localType1) 90new CSharpCompilationReference(localType2), 91new CSharpCompilationReference(localType1) 426references: new List<MetadataReference>() { new CSharpCompilationReference(localType1, embedInteropTypes: true) }); 432new CSharpCompilationReference(localType2), 433new CSharpCompilationReference(localType1) 473new CSharpCompilationReference(localType)
Symbols\Metadata\PE\TypeForwarders.cs (15)
1612var modCompilation = CreateCompilation(mod, references: new[] { new CSharpCompilationReference(forwardedTypesCompilation) }, options: TestOptions.ReleaseModule); 1622var appCompilation = CreateCompilation(app, references: new[] { modRef1, new CSharpCompilationReference(forwardedTypesCompilation) }, options: TestOptions.ReleaseDll); 1678appCompilation = CreateCompilation(app, references: new MetadataReference[] { modRef2, new CSharpCompilationReference(forwardedTypesCompilation) }, options: TestOptions.ReleaseDll); 1700appCompilation = CreateCompilation(app, references: new[] { modRef1, new CSharpCompilationReference(forwardedTypesCompilation) }, options: TestOptions.ReleaseModule); 1827", new[] { new CSharpCompilationReference(cA_v1) }, options: TestOptions.ReleaseDll, assemblyName: "B"); 1841", new[] { new CSharpCompilationReference(cC_v1) }, options: TestOptions.ReleaseDll, assemblyName: "A"); 1847", new[] { new CSharpCompilationReference(cC_v1) }, options: TestOptions.ReleaseModule, assemblyName: "D"); 1851var cA_v3 = CreateCompilation(@"", new[] { cD_ImageRef, new CSharpCompilationReference(cC_v1) }, options: TestOptions.ReleaseDll, assemblyName: "A"); 1862new CSharpCompilationReference(cA_v2), 1863new CSharpCompilationReference(cA_v3) 1868new CSharpCompilationReference(cB), 1874new CSharpCompilationReference(cC_v1), 1875new CSharpCompilationReference(cC_v2), 1955comp = CreateCompilation(sourceProgram, references: new[] { refA1, new CSharpCompilationReference(compB2, aliases: ImmutableArray.Create("B")), refBImpl }); 2019comp = CreateCompilation(sourceProgram, references: new[] { refA1, new CSharpCompilationReference(compB2, aliases: ImmutableArray.Create("B")), refBImpl });
Symbols\OverriddenOrHiddenMembersTests.cs (4)
735var comp1ref = new CSharpCompilationReference(comp1); 739var comp2ref = new CSharpCompilationReference(comp2); 2195", new MetadataReference[] { new CSharpCompilationReference(c1) }); 2238", new MetadataReference[] { new CSharpCompilationReference(c1) });
Symbols\Retargeting\NoPia.cs (32)
954references: new MetadataReference[] { new CSharpCompilationReference(Pia1, embedInteropTypes: true) }); 959references: new MetadataReference[] { new CSharpCompilationReference(Pia1, embedInteropTypes: true) }); 1260var localTypes1Ref = new CSharpCompilationReference(LocalTypes1); 1286var localTypes1Ref = new CSharpCompilationReference(LocalTypes1); 1310var piaRef = new CSharpCompilationReference(Pia1); 1313references: new MetadataReference[] { new CSharpCompilationReference(Pia1, embedInteropTypes: true) }); 1316var localTypes1Ref = new CSharpCompilationReference(LocalTypes1); 1849references: new MetadataReference[] { new CSharpCompilationReference(pia).WithEmbedInteropTypes(true) }); 1937references: new MetadataReference[] { new CSharpCompilationReference(Pia1, embedInteropTypes: true) }); 2046references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2047new CSharpCompilationReference(pia)}); 2062new CSharpCompilationReference(pia)}); 2076references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2171references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2172new CSharpCompilationReference(pia)}); 2187new CSharpCompilationReference(pia)}); 2201references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2296references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2297new CSharpCompilationReference(pia)}); 2312new CSharpCompilationReference(pia)}); 2326references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2403references: new MetadataReference[] { new CSharpCompilationReference(pia, embedInteropTypes: true) }); 2408references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2409new CSharpCompilationReference(pia)}); 2423references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2504references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2505new CSharpCompilationReference(pia)}); 2520new CSharpCompilationReference(pia)}); 2534references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2599references: new[] { new CSharpCompilationReference(pia1, embedInteropTypes: true) }); 2617references: new[] { new CSharpCompilationReference(multiModule), 2618new CSharpCompilationReference(pia1)});
Symbols\Retargeting\RetargetCustomAttributes.cs (3)
69c1 = new CSharpCompilationReference(compilation1); 74c2 = new CSharpCompilationReference(compilation2); 298var c2 = CreateEmptyCompilation(source2, new MetadataReference[] { NewMsCorLib, new CSharpCompilationReference(c1) });
Symbols\Retargeting\RetargetCustomModifiers.cs (2)
36CSharpCompilation c2 = CSharpCompilation.Create("C2", references: new MetadataReference[] { newMsCorLib, new CSharpCompilationReference(c1) }); 150var r1 = new CSharpCompilationReference(c1);
Symbols\Retargeting\RetargetExplicitInterfaceImplementation.cs (2)
118new CSharpCompilationReference(comp1) 382new CSharpCompilationReference(comp1)
Symbols\Retargeting\RetargetingTests.cs (4)
260var compilation2 = CreateCompilation(source2, new[] { new CSharpCompilationReference(compilation1_v1) }, assemblyName: "assembly2"); 262var compilation2Ref = new CSharpCompilationReference(compilation2); 264var compilation3 = CreateCompilation("", new[] { compilation2Ref, new CSharpCompilationReference(compilation1_v2) }, assemblyName: "assembly3"); 735var comp2 = CreateEmptyCompilation("", new[] { MscorlibRef_v4_0_30316_17626, new CSharpCompilationReference(comp1) }, TestOptions.ReleaseDll);
Symbols\Source\BaseClassTests.cs (7)
1031var comp2 = CreateCompilation(text, new MetadataReference[] { ClassAv2, new CSharpCompilationReference(comp) }); 1090new CSharpCompilationReference(comp) 1159new CSharpCompilationReference(comp), 1216new CSharpCompilationReference(comp) 1614CSharpCompilation c2 = CreateCompilation(textB, new[] { new CSharpCompilationReference(c1) }); 1651var compilation2 = CreateCompilation(source2, new[] { new CSharpCompilationReference(compilation1) }, assemblyName: "Two"); 1843var compilation2 = CreateCompilation(source2, new[] { new CSharpCompilationReference(compilation1) }, assemblyName: "Two");
Symbols\Source\EventTests.cs (1)
507var libCompRef = new CSharpCompilationReference(libComp);
Symbols\Source\ExternAliasTests.cs (1)
471var libRef = new CSharpCompilationReference(CreateCompilation(libSource, assemblyName: "lib"), aliases: ImmutableArray.Create("A"));
Symbols\Source\MethodTests.cs (4)
756var compRef1 = new CSharpCompilationReference(comp1); 762var compRef2 = new CSharpCompilationReference(comp2); 1045var compRef1 = new CSharpCompilationReference(comp1); 1051var compRef2 = new CSharpCompilationReference(comp2);
Symbols\SymbolDistinguisherTests.cs (4)
77var libRef = new CSharpCompilationReference(CreateCompilation(Parse(source, "file1.cs"), assemblyName: "Metadata")); 117var libRef = new CSharpCompilationReference(CreateCompilation(tree, assemblyName: "Metadata")); 579var libRef = new CSharpCompilationReference(CreateCompilation(Parse(libSource, "file.cs"), assemblyName: "Metadata")); 781var ref0 = new CSharpCompilationReference(comp0);
Symbols\SymbolEqualityTests.cs (1)
341var comp2 = (Compilation)CreateCompilation(source2, new[] { new CSharpCompilationReference((CSharpCompilation)comp1) });
Symbols\SymbolErrorTests.cs (34)
5600new CSharpCompilationReference(lib) 5661new CSharpCompilationReference(lib) 5721new CSharpCompilationReference(lib) 5782new CSharpCompilationReference(lib) 5841new CSharpCompilationReference(lib) 5898new CSharpCompilationReference(lib) 5957new CSharpCompilationReference(lib) 6016new CSharpCompilationReference(lib) 6214new CSharpCompilationReference(lib) 6275new CSharpCompilationReference(lib) 6336new CSharpCompilationReference(lib) 6397new CSharpCompilationReference(lib) 6461new CSharpCompilationReference(lib) 6524new CSharpCompilationReference(lib) 6588new CSharpCompilationReference(lib) 6658new CSharpCompilationReference(lib) 6721new CSharpCompilationReference(lib) 6791new CSharpCompilationReference(lib) 7190var forwardedTypes1Ref = new CSharpCompilationReference(forwardedTypes1); 7193var forwardedTypes2Ref = new CSharpCompilationReference(forwardedTypes2); 7267new CSharpCompilationReference(forwardedTypes1, aliases: ImmutableArray.Create("FT1")) 7286new CSharpCompilationReference(forwardedTypes1, ImmutableArray.Create("FT1")) 13729var compRef1 = new CSharpCompilationReference(comp1); 16115var ref1 = new CSharpCompilationReference(comp1); 16183var ref1 = new CSharpCompilationReference(comp, embedInteropTypes: true); 16211var ref1 = new CSharpCompilationReference(comp); 16249var ref1 = new CSharpCompilationReference(comp, embedInteropTypes: true); 16452var ref1 = new CSharpCompilationReference(comp, embedInteropTypes: true); 17652new CSharpCompilationReference(ref1), 17653new CSharpCompilationReference(ref2), 17733new CSharpCompilationReference(ref1), 17734new CSharpCompilationReference(ref2), 20294", new[] { new CSharpCompilationReference(comp1) }, options: TestOptions.ReleaseDll); 20308var comp3 = CreateCompilation(source3, new[] { new CSharpCompilationReference(comp2) }, options: TestOptions.ReleaseDll);
Symbols\TypeResolutionTests.cs (6)
68new CSharpCompilationReference(c1), 78new CSharpCompilationReference(c2), 91new CSharpCompilationReference(c1), 92new CSharpCompilationReference(c2), 172new CSharpCompilationReference(c1), 173new CSharpCompilationReference(c2)
Symbols\TypeTests.cs (8)
190var compRef1 = new CSharpCompilationReference(comp1); 194var compRef2 = new CSharpCompilationReference(comp2); 378var compRef1 = new CSharpCompilationReference(comp1); 397compRef1 = new CSharpCompilationReference(comp1); 416compRef1 = new CSharpCompilationReference(comp1); 439compRef1 = new CSharpCompilationReference(comp1); 781var compilation3 = CreateCompilation(testText, new[] { new CSharpCompilationReference(compilation1), new CSharpCompilationReference(compilation2) });
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
MetadataTestHelpers.cs (1)
54refs.Add(new CSharpCompilationReference(c));
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
CodeGen\WinMdEventTests.cs (1)
626var comp2 = CreateEmptyCompilation(source2, WinRtRefs.Concat(new MetadataReference[] { new CSharpCompilationReference(comp1), serializationRef, SystemXmlRef }), TestOptions.ReleaseExe);
106 references to CSharpCompilationReference
Microsoft.CodeAnalysis.CSharp (4)
Compilation\CSharpCompilation.cs (2)
387var validatedReferences = ValidateReferences<CSharpCompilationReference>(references); 616ValidateReferences<CSharpCompilationReference>(references),
Symbols\ReferenceManager.cs (2)
87var csReference = compilationReference as CSharpCompilationReference;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (8)
Emit\CompilationEmitTests.cs (4)
4676var compRef = new CSharpCompilationReference(refCompilation); 4806var compRef = new CSharpCompilationReference(refCompilation); 4893var compRef = new CSharpCompilationReference(refCompilation); 4970var compRef = new CSharpCompilationReference(refCompilation);
Emit\DeterministicTests.cs (3)
300var forwardedToReference1 = new CSharpCompilationReference(forwardedToCompilation1); 318var forwardingReference = new CSharpCompilationReference(forwardingCompilation); 353var forwardedToReference2 = new CSharpCompilationReference(forwardedToCompilation2);
Emit\NoPiaEmbedTypes.cs (1)
5489var piaRef1 = new CSharpCompilationReference(piaCompilation, embedInteropTypes: true);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (15)
Attributes\AttributeTests_Assembly.cs (3)
377var neutralRef = new CSharpCompilationReference(neutral); 387var deRef = new CSharpCompilationReference(de); 397var en_usRef = new CSharpCompilationReference(en_us);
Attributes\AttributeTests_WellKnownAttributes.cs (2)
565var libCompRef = new CSharpCompilationReference(libComp); 5184var compref1 = new CSharpCompilationReference(comp1);
Attributes\InternalsVisibleToAndStrongNameTests.cs (6)
2034var ref1 = new CSharpCompilationReference(comp1); 2038var ref2 = new CSharpCompilationReference(comp2); 2152var ref1 = new CSharpCompilationReference(comp1); 2156var ref2 = new CSharpCompilationReference(comp2); 2160var ref3 = new CSharpCompilationReference(comp3); 2318var ref1 = new CSharpCompilationReference(comp1);
FlowAnalysis\StructTests.cs (4)
234var sourceReference = new CSharpCompilationReference(comp1); 294var sourceReference = new CSharpCompilationReference(comp1); 327var sourceReference = new CSharpCompilationReference(comp1); 372var sourceReference = new CSharpCompilationReference(comp1);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\AmbiguousOverrideTests.cs (2)
131var comp1ref = new CSharpCompilationReference(comp1); 135var comp2ref = new CSharpCompilationReference(comp2);
Semantics\ConstantTests.cs (3)
2886var reference1 = new CSharpCompilationReference(compilation1); 2888var reference2 = new CSharpCompilationReference(compilation2); 2890var reference3 = new CSharpCompilationReference(compilation3);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (74)
BadSymbolReference.cs (9)
842var lib1Ref = new CSharpCompilationReference(lib1); 852var lib2Ref = new CSharpCompilationReference(lib2); 867var lib3Ref = new CSharpCompilationReference(lib3); 1031var lib1Ref = new CSharpCompilationReference(lib1); 1053var lib2Ref = new CSharpCompilationReference(lib2); 1079var lib3Ref = new CSharpCompilationReference(lib3); 1316var lib1Ref = new CSharpCompilationReference(lib1); 1325var lib2Ref = new CSharpCompilationReference(lib2); 1334var lib3Ref = new CSharpCompilationReference(lib3);
Compilation\CompilationAPITests.cs (1)
1287Assert.True(comp.ExternalReferences[2] is CSharpCompilationReference, "Expected compilation reference");
Compilation\ReferenceManagerTests.cs (1)
1889var r1 = new CSharpCompilationReference(pl);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
3100var ref1 = new CSharpCompilationReference(comp1);
SymbolDisplay\SymbolDisplayTests.cs (1)
4424var compref = new CSharpCompilationReference(complib);
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (3)
199var comp1ref = new CSharpCompilationReference(comp1); 203var comp2ref = new CSharpCompilationReference(comp2); 860var compref = new CSharpCompilationReference(comp0);
Symbols\AssemblyAndNamespaceTests.cs (6)
119var compRef = new CSharpCompilationReference(comp1); 162var compRef = new CSharpCompilationReference(comp1); 205var compRef1 = new CSharpCompilationReference(comp1); 206var compRef2 = new CSharpCompilationReference(comp2); 254var compRef1 = new CSharpCompilationReference(comp1); 255var compRef2 = new CSharpCompilationReference(comp2);
Symbols\ExtensionMethodTests.cs (1)
3109var libReference = new CSharpCompilationReference(libCompilation);
Symbols\InterfaceImplementationTests.cs (7)
234var comp1ref = new CSharpCompilationReference(comp1); 238var comp2ref = new CSharpCompilationReference(comp2); 306var comp1ref = new CSharpCompilationReference(comp1); 310var comp2ref = new CSharpCompilationReference(comp2); 420var comp1ref = new CSharpCompilationReference(comp1); 424var comp2ref = new CSharpCompilationReference(comp2); 1894var ref1 = new CSharpCompilationReference(comp1);
Symbols\Metadata\PE\NoPia.cs (14)
1108var pia5Link = new CSharpCompilationReference(varC_Pia5, embedInteropTypes: true); 1109var pia5Ref = new CSharpCompilationReference(varC_Pia5, embedInteropTypes: false); 1116var pia1Link = new CSharpCompilationReference(varC_Pia1, embedInteropTypes: true); 1117var pia1Ref = new CSharpCompilationReference(varC_Pia1, embedInteropTypes: false); 1124var library2Ref = new CSharpCompilationReference(varC_Library2, embedInteropTypes: false); 1125var library2Link = new CSharpCompilationReference(varC_Library2, embedInteropTypes: true); 1269var varALink = new CSharpCompilationReference(varC_A, embedInteropTypes: true); 1270var varARef = new CSharpCompilationReference(varC_A, embedInteropTypes: false); 1274var varBLink = new CSharpCompilationReference(varC_B, embedInteropTypes: true); 1275var varBRef = new CSharpCompilationReference(varC_B, embedInteropTypes: false); 1279var varCLink = new CSharpCompilationReference(varC_C, embedInteropTypes: true); 1280var varCRef = new CSharpCompilationReference(varC_C, embedInteropTypes: false); 1284var varDLink = new CSharpCompilationReference(varC_D, embedInteropTypes: true); 1285var varDRef = new CSharpCompilationReference(varC_D, embedInteropTypes: false);
Symbols\OverriddenOrHiddenMembersTests.cs (2)
735var comp1ref = new CSharpCompilationReference(comp1); 739var comp2ref = new CSharpCompilationReference(comp2);
Symbols\Retargeting\NoPia.cs (4)
1260var localTypes1Ref = new CSharpCompilationReference(LocalTypes1); 1286var localTypes1Ref = new CSharpCompilationReference(LocalTypes1); 1310var piaRef = new CSharpCompilationReference(Pia1); 1316var localTypes1Ref = new CSharpCompilationReference(LocalTypes1);
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
23public CSharpCompilationReference c1, c2;
Symbols\Retargeting\RetargetCustomModifiers.cs (1)
150var r1 = new CSharpCompilationReference(c1);
Symbols\Retargeting\RetargetingTests.cs (1)
262var compilation2Ref = new CSharpCompilationReference(compilation2);
Symbols\Source\EventTests.cs (1)
507var libCompRef = new CSharpCompilationReference(libComp);
Symbols\Source\ExternAliasTests.cs (1)
471var libRef = new CSharpCompilationReference(CreateCompilation(libSource, assemblyName: "lib"), aliases: ImmutableArray.Create("A"));
Symbols\Source\MethodTests.cs (4)
756var compRef1 = new CSharpCompilationReference(comp1); 762var compRef2 = new CSharpCompilationReference(comp2); 1045var compRef1 = new CSharpCompilationReference(comp1); 1051var compRef2 = new CSharpCompilationReference(comp2);
Symbols\SymbolDistinguisherTests.cs (4)
77var libRef = new CSharpCompilationReference(CreateCompilation(Parse(source, "file1.cs"), assemblyName: "Metadata")); 117var libRef = new CSharpCompilationReference(CreateCompilation(tree, assemblyName: "Metadata")); 579var libRef = new CSharpCompilationReference(CreateCompilation(Parse(libSource, "file.cs"), assemblyName: "Metadata")); 781var ref0 = new CSharpCompilationReference(comp0);
Symbols\SymbolErrorTests.cs (8)
7190var forwardedTypes1Ref = new CSharpCompilationReference(forwardedTypes1); 7193var forwardedTypes2Ref = new CSharpCompilationReference(forwardedTypes2); 13729var compRef1 = new CSharpCompilationReference(comp1); 16115var ref1 = new CSharpCompilationReference(comp1); 16183var ref1 = new CSharpCompilationReference(comp, embedInteropTypes: true); 16211var ref1 = new CSharpCompilationReference(comp); 16249var ref1 = new CSharpCompilationReference(comp, embedInteropTypes: true); 16452var ref1 = new CSharpCompilationReference(comp, embedInteropTypes: true);
Symbols\TypeTests.cs (3)
190var compRef1 = new CSharpCompilationReference(comp1); 194var compRef2 = new CSharpCompilationReference(comp2); 378var compRef1 = new CSharpCompilationReference(comp1);