565 instantiations of CSharpCompilationReference
Microsoft.CodeAnalysis.CSharp (2)
Compilation\CSharpCompilation.cs (1)
1291return new CSharpCompilationReference(this, aliases, embedInteropTypes);
Compilation\CSharpCompilationReference.cs (1)
51return new CSharpCompilationReference(Compilation, properties);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
SymbolKey\SymbolKeyMetadataVsSourceTests.cs (3)
64var comp2 = (Compilation)CreateCompilation(src2, [new CSharpCompilationReference(comp1)]); 337var comp40 = CreateCompilation(src2, [new CSharpCompilationReference(comp20)]); 421var comp40 = CreateCompilation(src2, [new CSharpCompilationReference(comp20)]);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (154)
BreakingChanges.cs (1)
92var comp = CreateCompilation(source2, new[] { new CSharpCompilationReference(compilation1) });
CodeGen\CodeGenDynamicTests.cs (2)
7494new[] { new CSharpCompilationReference(lib), SystemCoreRef, CSharpRef }); 7592new[] { 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) }, 4181var comp = CompileAndVerify(source2, references: new[] { new CSharpCompilationReference(compref) }, expectedOutput: "M"); 4386var B = CreateCompilation(@"public interface B { void M(A a); }", references: new[] { new CSharpCompilationReference(A) }, assemblyName: "B"); 4387var C = CreateCompilation(@"public class C { public void M(A a) { } }", references: new[] { new CSharpCompilationReference(A) }, assemblyName: "C"); 4389var D = CreateCompilation(@"public class D : C, B { }", references: new[] { new CSharpCompilationReference(B), new CSharpCompilationReference(C) }, assemblyName: "D");
CodeGen\CodeGenTests.cs (1)
11797CompileAndVerify(source2, new[] { new CSharpCompilationReference(compilation1) }).VerifyIL("Test.Main", @"
CodeGen\CodeGenTupleTest.cs (13)
4232new CSharpCompilationReference(comp1), 4233new CSharpCompilationReference(comp2), 4276var comp = CreateCompilation(source, references: new[] { new CSharpCompilationReference(comp1), new CSharpCompilationReference(comp2) }, options: TestOptions.ReleaseExe); 4319var comp = CreateCompilationWithMscorlib40(source, references: new[] { new CSharpCompilationReference(comp1), new CSharpCompilationReference(comp2) }); 4342var comp = CreateCompilationWithMscorlib40(source, references: new[] { new CSharpCompilationReference(comp1), new CSharpCompilationReference(comp2) }); 4366references: new[] { new CSharpCompilationReference(comp1), 4367new CSharpCompilationReference(comp2) }); 4426var 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) }); 19772var comp3 = CreateCompilationWithMscorlib46(source2, references: new[] { new CSharpCompilationReference(comp2) });
Emit\CompilationEmitTests.cs (4)
4682var compRef = new CSharpCompilationReference(refCompilation); 4812var compRef = new CSharpCompilationReference(refCompilation); 4899var compRef = new CSharpCompilationReference(refCompilation); 4976var 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 (92)
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) }); 3106references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3186references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3250references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3307references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3374references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3442references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3592references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3657references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3714references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3761references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3842references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation1, embedInteropTypes: true), 3843new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 3907references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 3983references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: false) }, assemblyName: "Consumer1"); 3989references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true), 3990new CSharpCompilationReference(compilation1, embedInteropTypes: false) }); 3995references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true), 4002new CSharpCompilationReference(compilation1, embedInteropTypes: false) }); 4079references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: false) }, assemblyName: "Consumer1"); 4085references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true), 4086new CSharpCompilationReference(compilation1, embedInteropTypes: false) }); 4091references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true), 4098new CSharpCompilationReference(compilation1, embedInteropTypes: false) }); 4159references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 4243references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 4320references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 4385references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 4450references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true), CSharpRef }); 4510references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true), CSharpRef }); 4570references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true), CSharpRef }); 4636references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true), CSharpRef }); 4694references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation1, embedInteropTypes: true) }); 4717references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 4763references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation1, embedInteropTypes: true) }); 4788references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 4806references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2) }); 4863references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation1, embedInteropTypes: true) }); 4889references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 4897references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2) }); 4944references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation1, embedInteropTypes: true) }); 4967references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 5015references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation1, embedInteropTypes: true) }); 5039references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 5083references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 5131references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 5182references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation1, embedInteropTypes: true) }); 5205references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 5213references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2) }); 5340references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation1, embedInteropTypes: true) }); 5366references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2, embedInteropTypes: true) }); 5374references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation2) }); 5531var NetImpl_1_Compilation = CreateCompilation(NetImpl_cs, new[] { new CSharpCompilationReference(IEvent_Compilation, embedInteropTypes: true) }, options: TestOptions.ReleaseDll, assemblyName: "NetImpl"); 5581MetadataReference[] NetImpl_refs = new MetadataReference[] { new CSharpCompilationReference(NetImpl_1_Compilation), 5582new CSharpCompilationReference(NetImpl_2_Compilation), 5586MetadataReference[] IEvent_refs = new MetadataReference[] { new CSharpCompilationReference(IEvent_Compilation), 5587new CSharpCompilationReference(IEvent_Compilation, embedInteropTypes: true), 5638references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }); 5706var piaRef1 = new CSharpCompilationReference(piaCompilation, embedInteropTypes: true); 5822references: new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) });
Emit\OptionalArgumentsTests.cs (1)
175references: new[] { new CSharpCompilationReference(comp1) },
PrivateProtected.cs (5)
138references: new[] { new CSharpCompilationReference(baseCompilation) }, 241references: new[] { new CSharpCompilationReference(baseCompilation) }, 705references: new[] { new CSharpCompilationReference(compilation1) }) 731references: new[] { new CSharpCompilationReference(compilation1) }) 758references: new[] { new CSharpCompilationReference(compilation1) })
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (19)
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")), 1415new CSharpCompilationReference(dummyCompilation1, ImmutableArray.Create("global", "A")), 1416new CSharpCompilationReference(dummyCompilation2, ImmutableArray.Create("B", "global")) 1486references: new[] { new CSharpCompilationReference(libComp, ImmutableArray.Create("P")) }); 1562new CSharpCompilationReference(dummyCompilation1, ImmutableArray.Create("P")) , 1563new CSharpCompilationReference(dummyCompilation2, ImmutableArray.Create("Q")), 1564new CSharpCompilationReference(dummyCompilation3, ImmutableArray.Create("R")) 1718new CSharpCompilationReference(compilation1, ImmutableArray.Create("A", "B")) 1786new CSharpCompilationReference(compilation1, ImmutableArray.Create("global", "B", "A", "A", "global")) 1868new CSharpCompilationReference(dummyCompilation1, ImmutableArray.Create("P")), 1869new CSharpCompilationReference(dummyCompilation2, ImmutableArray.Create("Q")), 1870new CSharpCompilationReference(dummyCompilation3, ImmutableArray.Create("R")), 2046new CSharpCompilationReference(dummyCompilation1, ImmutableArray.Create("P")), 2047new CSharpCompilationReference(dummyCompilation2, ImmutableArray.Create("Q")), 2048new CSharpCompilationReference(dummyCompilation3, ImmutableArray.Create("R")), 2049new CSharpCompilationReference(dummyCompilation4, ImmutableArray.Create("S")),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (46)
Attributes\AttributeTests.cs (4)
9952var compilation2 = CreateCompilation(source2, new[] { new CSharpCompilationReference(compilation1) }); 9971var compilation3 = CreateCompilation(source3, new[] { new CSharpCompilationReference(compilation1) }); 10034var compilation2 = CreateCompilationWithMscorlib40(source2, new[] { new CSharpCompilationReference(compilation1) }, options: TestOptions.DebugDll, assemblyName: "Test.dll"); 10045var compilation3 = CreateCompilationWithMscorlib461(source2, new[] { new CSharpCompilationReference(compilation1) }, options: TestOptions.DebugDll);
Attributes\AttributeTests_Assembly.cs (3)
378var neutralRef = new CSharpCompilationReference(neutral); 388var deRef = new CSharpCompilationReference(de); 398var en_usRef = new CSharpCompilationReference(en_us);
Attributes\AttributeTests_Experimental.cs (1)
104var comp2B = CreateCompilation(source2, new[] { new CSharpCompilationReference(comp1) });
Attributes\AttributeTests_WellKnownAttributes.cs (10)
566var libCompRef = new CSharpCompilationReference(libComp); 978", new[] { new CSharpCompilationReference(c1) }); 5273var compref1 = new CSharpCompilationReference(comp1); 5275var comp3 = CreateCompilation(text3, references: new[] { compref1, new CSharpCompilationReference(comp2) }, options: opt, assemblyName: "Child2"); 5279comp3 = CreateCompilation(text3, references: new[] { compref1, new CSharpCompilationReference(comp2) }, options: opt, assemblyName: "Child2"); 6759CreateCompilation(s, new[] { new CSharpCompilationReference(other) }).VerifyDiagnostics( 9844var compilation2 = CreateEmptyCompilation(source2, WinRtRefs.Concat(new[] { new CSharpCompilationReference(compilation1) }), TestOptions.ReleaseDll); 9990var compilation3 = CreateCompilationWithMscorlib40AndSystemCore(source2, new[] { new CSharpCompilationReference(compilation1) }); 10073var compilation3 = CreateCompilationWithMscorlib40AndSystemCore(source2, new[] { new CSharpCompilationReference(compilation1) }); 10224var compilation2 = CreateEmptyCompilation(source2, WinRtRefs.Concat(new[] { new CSharpCompilationReference(compilation1) }), TestOptions.ReleaseDll);
Attributes\InternalsVisibleToAndStrongNameTests.cs (24)
811new[] { new CSharpCompilationReference(other) }, 835new[] { new CSharpCompilationReference(other) }, 916new MetadataReference[] { new CSharpCompilationReference(other) }, 945references: new[] { new CSharpCompilationReference(other) }, 1104new[] { new CSharpCompilationReference(other) }, 1134new[] { new CSharpCompilationReference(other) }, 1163new[] { new CSharpCompilationReference(other) }, 1194new MetadataReference[] { new CSharpCompilationReference(other) }, 1229new MetadataReference[] { new CSharpCompilationReference(other) }, 1269new MetadataReference[] { new CSharpCompilationReference(other) }, 1301new MetadataReference[] { new CSharpCompilationReference(other) }, 1337new MetadataReference[] { new CSharpCompilationReference(other) }, 1382new MetadataReference[] { new CSharpCompilationReference(giver) }, 2087var ref1 = new CSharpCompilationReference(comp1); 2091var ref2 = new CSharpCompilationReference(comp2); 2206var ref1 = new CSharpCompilationReference(comp1); 2210var ref2 = new CSharpCompilationReference(comp2); 2214var ref3 = new CSharpCompilationReference(comp3); 2373var ref1 = new CSharpCompilationReference(comp1); 2415CompileAndVerify(other.WithReferences(new[] { other.References.ElementAt(0), new CSharpCompilationReference(unsigned) })).VerifyDiagnostics(); 2443var comps = new[] {other.WithReferences(new []{other.References.ElementAt(0), new CSharpCompilationReference(unsigned)}), 2725references: new[] { new CSharpCompilationReference(ca) }, 2755var cb = CreateCompilation(sourceB, options: TestOptions.ReleaseExe, assemblyName: "X", references: new[] { new CSharpCompilationReference(ca) }, parseOptions: parseOptions); 2783var cb = CreateCompilation(sourceB, options: TestOptions.ReleaseExe, assemblyName: "X", references: new[] { new CSharpCompilationReference(ca) }, parseOptions: parseOptions);
FlowAnalysis\StructTests.cs (4)
544var sourceReference = new CSharpCompilationReference(comp1); 604var sourceReference = new CSharpCompilationReference(comp1); 637var sourceReference = new CSharpCompilationReference(comp1); 682var sourceReference = new CSharpCompilationReference(comp1);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (55)
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)
1595CSharpCompilation comp2 = CreateCompilationWithMscorlib461(source2, new MetadataReference[] { new CSharpCompilationReference(comp1, embedInteropTypes: true) }, assemblyName: "Bar948674_1"); 1606CSharpCompilation comp3 = CreateCompilationWithMscorlib461(source3, new MetadataReference[] { new CSharpCompilationReference(comp2), new CSharpCompilationReference(comp1, embedInteropTypes: true) }); 1648CSharpCompilation comp2 = CreateCompilationWithMscorlib461(source2, new MetadataReference[] { new CSharpCompilationReference(comp1, embedInteropTypes: true) }, assemblyName: "Bar948674_2"); 1659CSharpCompilation comp3 = CreateCompilationWithMscorlib461(source3, new MetadataReference[] { new CSharpCompilationReference(comp2), new CSharpCompilationReference(comp1, embedInteropTypes: true) }); 1704CSharpCompilation comp2 = CreateCompilationWithMscorlib461(source2, new MetadataReference[] { new CSharpCompilationReference(comp1, embedInteropTypes: true) }, assemblyName: "Bar948674_3"); 1713CSharpCompilation comp3 = CreateCompilationWithMscorlib461(source3, new MetadataReference[] { new CSharpCompilationReference(comp2), new CSharpCompilationReference(comp1, embedInteropTypes: true) }); 1752CSharpCompilation comp2 = CreateCompilationWithMscorlib461(source2, new MetadataReference[] { new CSharpCompilationReference(comp1, embedInteropTypes: true) }, assemblyName: "Bar948674_4"); 1761CSharpCompilation comp3 = CreateCompilationWithMscorlib461(source3, new MetadataReference[] { new CSharpCompilationReference(comp2), new CSharpCompilationReference(comp1, embedInteropTypes: true) });
Semantics\ColorColorTests.cs (2)
2105new CSharpCompilationReference(refLib), 2148new 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)
4611new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) },
Semantics\LambdaTests.cs (2)
382new[] { new CSharpCompilationReference(comp1) }); 433new CSharpCompilationReference(comp1),
Semantics\NamedAndOptionalTests.cs (1)
1679var exeComp = CreateCompilation(main, new[] { new CSharpCompilationReference(libComp) }, options: TestOptions.ReleaseExe, assemblyName: "Main");
Semantics\NullableReferenceTypesTests.cs (10)
8813var compRefs0 = new MetadataReference[] { new CSharpCompilationReference(comp0) }; 8836compRefs0 = new MetadataReference[] { new CSharpCompilationReference(comp0) }; 8866compRefs0 = new MetadataReference[] { new CSharpCompilationReference(comp0) }; 8945var comp1A = CreateCompilation(source1, references: new MetadataReference[] { new CSharpCompilationReference(comp0) }); 8995var comp1A = CreateCompilation(source1, references: new[] { new CSharpCompilationReference(comp0) }); 9159references: new MetadataReference[] { new CSharpCompilationReference(comp0) }); 9427var comp1 = CreateCompilation(source1, references: new MetadataReference[] { new CSharpCompilationReference(comp0) }); 76970new MetadataReference[] { new CSharpCompilationReference(piaCompilation, embedInteropTypes: true) }, 111692var comp = CreateCompilation(new[] { source }, options: WithNullableEnable(), references: new[] { new CSharpCompilationReference(comp0) }); 111710comp = CreateCompilation(new[] { source }, options: WithNullableEnable(), references: new[] { new CSharpCompilationReference(comp0) });
Semantics\OverloadResolutionTests.cs (2)
2306", new MetadataReference[] { new CSharpCompilationReference(cCommon) }, assemblyName: "cCS"); 2330new MetadataReference[] { new CSharpCompilationReference(cCommon) });
Semantics\StructsTests.cs (2)
383new[] { MscorlibRef, new CSharpCompilationReference(c1) }, 386var c1AsmRef = c2.GetReferencedAssemblySymbol(new CSharpCompilationReference(c1));
Semantics\UseSiteErrorTests.cs (7)
1093var main = CreateCompilation(mainSource, new[] { new CSharpCompilationReference(lib) }, assemblyName: "Main"); 1125var main = CreateCompilation(mainSource, new[] { new CSharpCompilationReference(lib) }, assemblyName: "Main"); 1154var main = CreateCompilation(mainSource, new[] { new CSharpCompilationReference(lib) }, assemblyName: "Main"); 1251var derivedLib = CreateCompilation(derivedSource, assemblyName: "DerivedAssembly", references: new[] { new CSharpCompilationReference(baseLib) }); 1267CreateCompilation(programSource, references: new[] { new CSharpCompilationReference(derivedLib) }).VerifyDiagnostics( 2195CSharpCompilation comp2 = CreateCompilation(source2, new MetadataReference[] { new CSharpCompilationReference(comp1) }); 2213CSharpCompilation 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)
14984}", 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)
4847var 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)
1435new CSharpCompilationReference(varC_MTTestLib2) 1474new CSharpCompilationReference(varC_MTTestLib2), 1491new CSharpCompilationReference(varC_MTTestLib2), 1492new CSharpCompilationReference(varC_MTTestLib3) 1559new CSharpCompilationReference(varC_MTTestLib2), 1560new CSharpCompilationReference(varC_MTTestLib3), 1578new CSharpCompilationReference(varC_MTTestLib2), 1579new CSharpCompilationReference(varC_MTTestLib3), 1580new CSharpCompilationReference(varC_MTTestLib4) 1682new CSharpCompilationReference(varC_MTTestLib3) 1694new CSharpCompilationReference(varC_MTTestLib2) 1706new CSharpCompilationReference(varC_MTTestLib2), 1707new CSharpCompilationReference(varC_MTTestLib3), 1708new CSharpCompilationReference(varC_MTTestLib4) 1783new CSharpCompilationReference(varC_MTTestLib4), 1784new CSharpCompilationReference(varC_MTTestLib2), 1785new CSharpCompilationReference(varC_MTTestLib3) 1802new CSharpCompilationReference(varC_MTTestLib4) 1815new CSharpCompilationReference(varC_MTTestLib2), 1816new CSharpCompilationReference(varC_MTTestLib3), 1817new CSharpCompilationReference(varC_MTTestLib4) 2235new CSharpCompilationReference(localC1_V1), 2236new CSharpCompilationReference(localC4_V1), 2237new CSharpCompilationReference(c7) 2256new CSharpCompilationReference(c3), 2257new CSharpCompilationReference(localC1_V2), 2258new CSharpCompilationReference(localC4_V2), 2259new CSharpCompilationReference(c7) 2562new CSharpCompilationReference(c1)
Symbols\CorLibrary\Choosing.cs (2)
50", new[] { new CSharpCompilationReference(corLib) }, options: TestOptions.ReleaseDll); 71", new[] { new CSharpCompilationReference(corLib) }, options: TestOptions.ReleaseDll);
Symbols\CustomModifiersTests.cs (1)
1525var compilation2 = CreateCompilationWithMscorlib461(new SyntaxTree[] { }, references: new[] { new CSharpCompilationReference(compilation1) });
Symbols\ExtensionMethodTests.cs (3)
2842var compilation2 = CreateCompilation(source2, references: new[] { new CSharpCompilationReference(compilation1) }, parseOptions: TestOptions.Regular8); 2861compilation2 = CreateCompilation(source2, references: new[] { new CSharpCompilationReference(compilation1) }, parseOptions: TestOptions.Regular7); 3103var libReference = new CSharpCompilationReference(libCompilation);
Symbols\GenericConstraintTests.cs (4)
3081var compilation2 = CreateCompilation(source2, assemblyName: "d03a3229-eb22-4682-88df-77efaa348e3b", references: new MetadataReference[] { new CSharpCompilationReference(compilation1) }); 3097var compilation3 = CreateCompilation(source3, references: new MetadataReference[] { new CSharpCompilationReference(compilation2) }); 6469var compilation2 = CreateCompilation(source2, references: new MetadataReference[] { new CSharpCompilationReference(compilation1) }); 6473var compilation3 = CreateCompilation(source3, references: new MetadataReference[] { new CSharpCompilationReference(compilation2) });
Symbols\IndexerTests.cs (1)
2835var 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)
1618var modCompilation = CreateCompilation(mod, references: new[] { new CSharpCompilationReference(forwardedTypesCompilation) }, options: TestOptions.ReleaseModule); 1628var appCompilation = CreateCompilation(app, references: new[] { modRef1, new CSharpCompilationReference(forwardedTypesCompilation) }, options: TestOptions.ReleaseDll); 1684appCompilation = CreateCompilation(app, references: new MetadataReference[] { modRef2, new CSharpCompilationReference(forwardedTypesCompilation) }, options: TestOptions.ReleaseDll); 1706appCompilation = CreateCompilation(app, references: new[] { modRef1, new CSharpCompilationReference(forwardedTypesCompilation) }, options: TestOptions.ReleaseModule); 1833", new[] { new CSharpCompilationReference(cA_v1) }, options: TestOptions.ReleaseDll, assemblyName: "B"); 1847", new[] { new CSharpCompilationReference(cC_v1) }, options: TestOptions.ReleaseDll, assemblyName: "A"); 1853", new[] { new CSharpCompilationReference(cC_v1) }, options: TestOptions.ReleaseModule, assemblyName: "D"); 1857var cA_v3 = CreateCompilation(@"", new[] { cD_ImageRef, new CSharpCompilationReference(cC_v1) }, options: TestOptions.ReleaseDll, assemblyName: "A"); 1868new CSharpCompilationReference(cA_v2), 1869new CSharpCompilationReference(cA_v3) 1874new CSharpCompilationReference(cB), 1880new CSharpCompilationReference(cC_v1), 1881new CSharpCompilationReference(cC_v2), 1961comp = CreateCompilation(sourceProgram, references: new[] { refA1, new CSharpCompilationReference(compB2, aliases: ImmutableArray.Create("B")), refBImpl }); 2025comp = 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)
955references: new MetadataReference[] { new CSharpCompilationReference(Pia1, embedInteropTypes: true) }); 960references: new MetadataReference[] { new CSharpCompilationReference(Pia1, embedInteropTypes: true) }); 1261var localTypes1Ref = new CSharpCompilationReference(LocalTypes1); 1287var localTypes1Ref = new CSharpCompilationReference(LocalTypes1); 1311var piaRef = new CSharpCompilationReference(Pia1); 1314references: new MetadataReference[] { new CSharpCompilationReference(Pia1, embedInteropTypes: true) }); 1317var localTypes1Ref = new CSharpCompilationReference(LocalTypes1); 1850references: new MetadataReference[] { new CSharpCompilationReference(pia).WithEmbedInteropTypes(true) }); 1938references: new MetadataReference[] { new CSharpCompilationReference(Pia1, embedInteropTypes: true) }); 2047references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2048new CSharpCompilationReference(pia)}); 2063new CSharpCompilationReference(pia)}); 2077references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2172references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2173new CSharpCompilationReference(pia)}); 2188new CSharpCompilationReference(pia)}); 2202references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2297references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2298new CSharpCompilationReference(pia)}); 2313new CSharpCompilationReference(pia)}); 2327references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2404references: new MetadataReference[] { new CSharpCompilationReference(pia, embedInteropTypes: true) }); 2409references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2410new CSharpCompilationReference(pia)}); 2424references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2505references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2506new CSharpCompilationReference(pia)}); 2521new CSharpCompilationReference(pia)}); 2535references: new MetadataReference[] {new CSharpCompilationReference(localTypes2), 2600references: new[] { new CSharpCompilationReference(pia1, embedInteropTypes: true) }); 2618references: new[] { new CSharpCompilationReference(multiModule), 2619new CSharpCompilationReference(pia1)});
Symbols\Retargeting\RetargetCustomAttributes.cs (3)
70c1 = new CSharpCompilationReference(compilation1); 75c2 = new CSharpCompilationReference(compilation2); 299var c2 = CreateEmptyCompilation(source2, new MetadataReference[] { NewMsCorLib, new CSharpCompilationReference(c1) });
Symbols\Retargeting\RetargetCustomModifiers.cs (2)
37CSharpCompilation c2 = CSharpCompilation.Create("C2", references: new MetadataReference[] { newMsCorLib, new CSharpCompilationReference(c1) }); 151var r1 = new CSharpCompilationReference(c1);
Symbols\Retargeting\RetargetExplicitInterfaceImplementation.cs (2)
117new CSharpCompilationReference(comp1) 381new 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)
1032var comp2 = CreateCompilation(text, new MetadataReference[] { ClassAv2, new CSharpCompilationReference(comp) }); 1091new CSharpCompilationReference(comp) 1160new CSharpCompilationReference(comp), 1217new CSharpCompilationReference(comp) 1615CSharpCompilation c2 = CreateCompilation(textB, new[] { new CSharpCompilationReference(c1) }); 1652var compilation2 = CreateCompilation(source2, new[] { new CSharpCompilationReference(compilation1) }, assemblyName: "Two"); 1844var 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)
757var compRef1 = new CSharpCompilationReference(comp1); 763var compRef2 = new CSharpCompilationReference(comp2); 1046var compRef1 = new CSharpCompilationReference(comp1); 1052var 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)
5676new CSharpCompilationReference(lib) 5737new CSharpCompilationReference(lib) 5797new CSharpCompilationReference(lib) 5858new CSharpCompilationReference(lib) 5917new CSharpCompilationReference(lib) 5974new CSharpCompilationReference(lib) 6033new CSharpCompilationReference(lib) 6092new CSharpCompilationReference(lib) 6290new CSharpCompilationReference(lib) 6351new CSharpCompilationReference(lib) 6412new CSharpCompilationReference(lib) 6473new CSharpCompilationReference(lib) 6537new CSharpCompilationReference(lib) 6600new CSharpCompilationReference(lib) 6664new CSharpCompilationReference(lib) 6734new CSharpCompilationReference(lib) 6797new CSharpCompilationReference(lib) 6867new CSharpCompilationReference(lib) 7266var forwardedTypes1Ref = new CSharpCompilationReference(forwardedTypes1); 7269var forwardedTypes2Ref = new CSharpCompilationReference(forwardedTypes2); 7343new CSharpCompilationReference(forwardedTypes1, aliases: ImmutableArray.Create("FT1")) 7362new CSharpCompilationReference(forwardedTypes1, ImmutableArray.Create("FT1")) 13877var compRef1 = new CSharpCompilationReference(comp1); 16260var ref1 = new CSharpCompilationReference(comp1); 16328var ref1 = new CSharpCompilationReference(comp, embedInteropTypes: true); 16356var ref1 = new CSharpCompilationReference(comp); 16394var ref1 = new CSharpCompilationReference(comp, embedInteropTypes: true); 16597var ref1 = new CSharpCompilationReference(comp, embedInteropTypes: true); 17797new CSharpCompilationReference(ref1), 17798new CSharpCompilationReference(ref2), 17878new CSharpCompilationReference(ref1), 17879new CSharpCompilationReference(ref2), 20439", new[] { new CSharpCompilationReference(comp1) }, options: TestOptions.ReleaseDll); 20453var 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)
191var compRef1 = new CSharpCompilationReference(comp1); 195var compRef2 = new CSharpCompilationReference(comp2); 379var compRef1 = new CSharpCompilationReference(comp1); 398compRef1 = new CSharpCompilationReference(comp1); 417compRef1 = new CSharpCompilationReference(comp1); 440compRef1 = new CSharpCompilationReference(comp1); 782var 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)
627var 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)
412var validatedReferences = ValidateReferences<CSharpCompilationReference>(references); 633ValidateReferences<CSharpCompilationReference>(references),
Symbols\ReferenceManager.cs (2)
86var csReference = compilationReference as CSharpCompilationReference;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (8)
Emit\CompilationEmitTests.cs (4)
4682var compRef = new CSharpCompilationReference(refCompilation); 4812var compRef = new CSharpCompilationReference(refCompilation); 4899var compRef = new CSharpCompilationReference(refCompilation); 4976var 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)
5706var piaRef1 = new CSharpCompilationReference(piaCompilation, embedInteropTypes: true);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (15)
Attributes\AttributeTests_Assembly.cs (3)
378var neutralRef = new CSharpCompilationReference(neutral); 388var deRef = new CSharpCompilationReference(de); 398var en_usRef = new CSharpCompilationReference(en_us);
Attributes\AttributeTests_WellKnownAttributes.cs (2)
566var libCompRef = new CSharpCompilationReference(libComp); 5273var compref1 = new CSharpCompilationReference(comp1);
Attributes\InternalsVisibleToAndStrongNameTests.cs (6)
2087var ref1 = new CSharpCompilationReference(comp1); 2091var ref2 = new CSharpCompilationReference(comp2); 2206var ref1 = new CSharpCompilationReference(comp1); 2210var ref2 = new CSharpCompilationReference(comp2); 2214var ref3 = new CSharpCompilationReference(comp3); 2373var ref1 = new CSharpCompilationReference(comp1);
FlowAnalysis\StructTests.cs (4)
544var sourceReference = new CSharpCompilationReference(comp1); 604var sourceReference = new CSharpCompilationReference(comp1); 637var sourceReference = new CSharpCompilationReference(comp1); 682var 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)
1285Assert.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)
4847var 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)
3103var 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)
1261var localTypes1Ref = new CSharpCompilationReference(LocalTypes1); 1287var localTypes1Ref = new CSharpCompilationReference(LocalTypes1); 1311var piaRef = new CSharpCompilationReference(Pia1); 1317var localTypes1Ref = new CSharpCompilationReference(LocalTypes1);
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
24public CSharpCompilationReference c1, c2;
Symbols\Retargeting\RetargetCustomModifiers.cs (1)
151var 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)
757var compRef1 = new CSharpCompilationReference(comp1); 763var compRef2 = new CSharpCompilationReference(comp2); 1046var compRef1 = new CSharpCompilationReference(comp1); 1052var 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)
7266var forwardedTypes1Ref = new CSharpCompilationReference(forwardedTypes1); 7269var forwardedTypes2Ref = new CSharpCompilationReference(forwardedTypes2); 13877var compRef1 = new CSharpCompilationReference(comp1); 16260var ref1 = new CSharpCompilationReference(comp1); 16328var ref1 = new CSharpCompilationReference(comp, embedInteropTypes: true); 16356var ref1 = new CSharpCompilationReference(comp); 16394var ref1 = new CSharpCompilationReference(comp, embedInteropTypes: true); 16597var ref1 = new CSharpCompilationReference(comp, embedInteropTypes: true);
Symbols\TypeTests.cs (3)
191var compRef1 = new CSharpCompilationReference(comp1); 195var compRef2 = new CSharpCompilationReference(comp2); 379var compRef1 = new CSharpCompilationReference(comp1);