565 instantiations of CSharpCompilationReference
Microsoft.CodeAnalysis.CSharp (2)
Compilation\CSharpCompilation.cs (1)
1291
return new
CSharpCompilationReference
(this, aliases, embedInteropTypes);
Compilation\CSharpCompilationReference.cs (1)
51
return new
CSharpCompilationReference
(Compilation, properties);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
SymbolKey\SymbolKeyMetadataVsSourceTests.cs (3)
64
var comp2 = (Compilation)CreateCompilation(src2, [new
CSharpCompilationReference
(comp1)]);
337
var comp40 = CreateCompilation(src2, [new
CSharpCompilationReference
(comp20)]);
421
var comp40 = CreateCompilation(src2, [new
CSharpCompilationReference
(comp20)]);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (154)
BreakingChanges.cs (1)
92
var comp = CreateCompilation(source2, new[] { new
CSharpCompilationReference
(compilation1) });
CodeGen\CodeGenDynamicTests.cs (2)
7494
new[] { new
CSharpCompilationReference
(lib), SystemCoreRef, CSharpRef });
7592
new[] { new
CSharpCompilationReference
(lib), SystemCoreRef, CSharpRef },
CodeGen\CodeGenExplicitImplementationTests.cs (7)
222
new
CSharpCompilationReference
(comp1)
378
references: new MetadataReference[] { asm01, new
CSharpCompilationReference
(comp1) },
996
var comp = CreateCompilation(source, new[] { new
CSharpCompilationReference
(libComp, aliases: ImmutableArray.Create("Q")) });
1045
var comp1 = CreateCompilation(source, new[] { new
CSharpCompilationReference
(libComp1, aliases: ImmutableArray.Create("A")), new
CSharpCompilationReference
(libComp1, aliases: ImmutableArray.Create("B")) });
1061
var comp2 = CreateCompilation(source, new[] { new
CSharpCompilationReference
(libComp1, aliases: ImmutableArray.Create("A")), new
CSharpCompilationReference
(libComp2, aliases: ImmutableArray.Create("B")) });
CodeGen\CodeGenFieldInitTests.cs (1)
701
CreateCompilation(source2, new[] { new
CSharpCompilationReference
(compilation1) }, assemblyName: "2110a705-cc34-430b-9450-ca37031aa828")
CodeGen\CodeGenImplicitImplementationTests.cs (1)
2296
var exeComp = CreateCompilation(exeSource, options: TestOptions.ReleaseExe, references: new[] { new
CSharpCompilationReference
(libComp) });
CodeGen\CodeGenInterfaceImplementation.cs (2)
370
references: new MetadataReference[] { asmRef, new
CSharpCompilationReference
(comp1), new
CSharpCompilationReference
(comp2) },
CodeGen\CodeGenOverridingAndHiding.cs (17)
2260
var comp = CompileAndVerify(source2, new[] { new
CSharpCompilationReference
(compilation1) }, expectedSignatures: new[]
2541
new[] { new
CSharpCompilationReference
(referencedCompilation) },
2831
refs.Add(new
CSharpCompilationReference
(comp1));
2924
refs.Add(new
CSharpCompilationReference
(comp1));
2989
references: new MetadataReference[] { asm01, asm02, new
CSharpCompilationReference
(comp1) },
3165
refs.Add(new
CSharpCompilationReference
(comp1));
3170
refs.Add(new
CSharpCompilationReference
(comp2));
3378
references: new MetadataReference[] { asm01, asm02, new
CSharpCompilationReference
(comp1) },
3383
references: new MetadataReference[] { asm01, asm02, new
CSharpCompilationReference
(comp1), new
CSharpCompilationReference
(comp2) },
3487
references: new MetadataReference[] { asmfile, new
CSharpCompilationReference
(comp1), new
CSharpCompilationReference
(comp2) },
4181
var comp = CompileAndVerify(source2, references: new[] { new
CSharpCompilationReference
(compref) }, expectedOutput: "M");
4386
var B = CreateCompilation(@"public interface B { void M(A a); }", references: new[] { new
CSharpCompilationReference
(A) }, assemblyName: "B");
4387
var C = CreateCompilation(@"public class C { public void M(A a) { } }", references: new[] { new
CSharpCompilationReference
(A) }, assemblyName: "C");
4389
var D = CreateCompilation(@"public class D : C, B { }", references: new[] { new
CSharpCompilationReference
(B), new
CSharpCompilationReference
(C) }, assemblyName: "D");
CodeGen\CodeGenTests.cs (1)
11797
CompileAndVerify(source2, new[] { new
CSharpCompilationReference
(compilation1) }).VerifyIL("Test.Main", @"
CodeGen\CodeGenTupleTest.cs (13)
4232
new
CSharpCompilationReference
(comp1),
4233
new
CSharpCompilationReference
(comp2),
4276
var comp = CreateCompilation(source, references: new[] { new
CSharpCompilationReference
(comp1), new
CSharpCompilationReference
(comp2) }, options: TestOptions.ReleaseExe);
4319
var comp = CreateCompilationWithMscorlib40(source, references: new[] { new
CSharpCompilationReference
(comp1), new
CSharpCompilationReference
(comp2) });
4342
var comp = CreateCompilationWithMscorlib40(source, references: new[] { new
CSharpCompilationReference
(comp1), new
CSharpCompilationReference
(comp2) });
4366
references: new[] { new
CSharpCompilationReference
(comp1),
4367
new
CSharpCompilationReference
(comp2) });
4426
var 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) });
19772
var comp3 = CreateCompilationWithMscorlib46(source2, references: new[] { new
CSharpCompilationReference
(comp2) });
Emit\CompilationEmitTests.cs (4)
4682
var compRef = new
CSharpCompilationReference
(refCompilation);
4812
var compRef = new
CSharpCompilationReference
(refCompilation);
4899
var compRef = new
CSharpCompilationReference
(refCompilation);
4976
var compRef = new
CSharpCompilationReference
(refCompilation);
Emit\DeterministicTests.cs (3)
300
var forwardedToReference1 = new
CSharpCompilationReference
(forwardedToCompilation1);
318
var forwardingReference = new
CSharpCompilationReference
(forwardingCompilation);
353
var forwardedToReference2 = new
CSharpCompilationReference
(forwardedToCompilation2);
Emit\EmitErrorTests.cs (4)
117
new[] { new
CSharpCompilationReference
(compilation1) },
151
new[] { new
CSharpCompilationReference
(compilation1) },
190
new[] { new
CSharpCompilationReference
(compilation1) },
237
var compilation2 = CreateCompilation(source2, new MetadataReference[] { new
CSharpCompilationReference
(compilation1) });
Emit\NoPiaEmbedTypes.cs (92)
71
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
116
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
193
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
262
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
322
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
373
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
423
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
472
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
522
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
572
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
622
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
672
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
722
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
821
var compilation = CreateEmptyCompilation(consumer, new MetadataReference[] { MscorlibRef_v20, new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) }, options: TestOptions.ReleaseExe);
871
var compilation = CreateEmptyCompilation(consumer, new MetadataReference[] { MscorlibRef_v20, new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) }, options: TestOptions.DebugExe);
1162
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
1721
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
1826
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
1913
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
2000
new MetadataReference[] { MscorlibRef_v4_0_30316_17626, new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) },
2064
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
2131
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
2189
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
2305
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
2390
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
2471
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
2534
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
2698
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
2770
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
2834
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
2895
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
2961
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
3027
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
3106
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
3186
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
3250
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
3307
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
3374
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
3442
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
3592
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
3657
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
3714
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
3761
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
3842
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation1, embedInteropTypes: true),
3843
new
CSharpCompilationReference
(piaCompilation2, embedInteropTypes: true) });
3907
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
3983
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: false) }, assemblyName: "Consumer1");
3989
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true),
3990
new
CSharpCompilationReference
(compilation1, embedInteropTypes: false) });
3995
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true),
4002
new
CSharpCompilationReference
(compilation1, embedInteropTypes: false) });
4079
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: false) }, assemblyName: "Consumer1");
4085
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true),
4086
new
CSharpCompilationReference
(compilation1, embedInteropTypes: false) });
4091
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true),
4098
new
CSharpCompilationReference
(compilation1, embedInteropTypes: false) });
4159
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
4243
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
4320
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
4385
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
4450
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true), CSharpRef });
4510
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true), CSharpRef });
4570
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true), CSharpRef });
4636
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true), CSharpRef });
4694
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation1, embedInteropTypes: true) });
4717
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation2, embedInteropTypes: true) });
4763
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation1, embedInteropTypes: true) });
4788
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation2, embedInteropTypes: true) });
4806
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation2) });
4863
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation1, embedInteropTypes: true) });
4889
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation2, embedInteropTypes: true) });
4897
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation2) });
4944
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation1, embedInteropTypes: true) });
4967
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation2, embedInteropTypes: true) });
5015
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation1, embedInteropTypes: true) });
5039
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation2, embedInteropTypes: true) });
5083
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation2, embedInteropTypes: true) });
5131
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation2, embedInteropTypes: true) });
5182
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation1, embedInteropTypes: true) });
5205
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation2, embedInteropTypes: true) });
5213
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation2) });
5340
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation1, embedInteropTypes: true) });
5366
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation2, embedInteropTypes: true) });
5374
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation2) });
5531
var NetImpl_1_Compilation = CreateCompilation(NetImpl_cs, new[] { new
CSharpCompilationReference
(IEvent_Compilation, embedInteropTypes: true) }, options: TestOptions.ReleaseDll, assemblyName: "NetImpl");
5581
MetadataReference[] NetImpl_refs = new MetadataReference[] { new
CSharpCompilationReference
(NetImpl_1_Compilation),
5582
new
CSharpCompilationReference
(NetImpl_2_Compilation),
5586
MetadataReference[] IEvent_refs = new MetadataReference[] { new
CSharpCompilationReference
(IEvent_Compilation),
5587
new
CSharpCompilationReference
(IEvent_Compilation, embedInteropTypes: true),
5638
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
5706
var piaRef1 = new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true);
5822
references: new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) });
Emit\OptionalArgumentsTests.cs (1)
175
references: new[] { new
CSharpCompilationReference
(comp1) },
PrivateProtected.cs (5)
138
references: new[] { new
CSharpCompilationReference
(baseCompilation) },
241
references: new[] { new
CSharpCompilationReference
(baseCompilation) },
705
references: new[] { new
CSharpCompilationReference
(compilation1) })
731
references: new[] { new
CSharpCompilationReference
(compilation1) })
758
references: new[] { new
CSharpCompilationReference
(compilation1) })
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (19)
PDB\PDBUsingTests.cs (19)
577
new
CSharpCompilationReference
(dummyCompilation1, ImmutableArray.Create("P")) ,
578
new
CSharpCompilationReference
(dummyCompilation2, ImmutableArray.Create("Q")),
579
new
CSharpCompilationReference
(dummyCompilation3, ImmutableArray.Create("R"))
793
new
CSharpCompilationReference
(dummyCompilation, ImmutableArray.Create("A", "A")),
1415
new
CSharpCompilationReference
(dummyCompilation1, ImmutableArray.Create("global", "A")),
1416
new
CSharpCompilationReference
(dummyCompilation2, ImmutableArray.Create("B", "global"))
1486
references: new[] { new
CSharpCompilationReference
(libComp, ImmutableArray.Create("P")) });
1562
new
CSharpCompilationReference
(dummyCompilation1, ImmutableArray.Create("P")) ,
1563
new
CSharpCompilationReference
(dummyCompilation2, ImmutableArray.Create("Q")),
1564
new
CSharpCompilationReference
(dummyCompilation3, ImmutableArray.Create("R"))
1718
new
CSharpCompilationReference
(compilation1, ImmutableArray.Create("A", "B"))
1786
new
CSharpCompilationReference
(compilation1, ImmutableArray.Create("global", "B", "A", "A", "global"))
1868
new
CSharpCompilationReference
(dummyCompilation1, ImmutableArray.Create("P")),
1869
new
CSharpCompilationReference
(dummyCompilation2, ImmutableArray.Create("Q")),
1870
new
CSharpCompilationReference
(dummyCompilation3, ImmutableArray.Create("R")),
2046
new
CSharpCompilationReference
(dummyCompilation1, ImmutableArray.Create("P")),
2047
new
CSharpCompilationReference
(dummyCompilation2, ImmutableArray.Create("Q")),
2048
new
CSharpCompilationReference
(dummyCompilation3, ImmutableArray.Create("R")),
2049
new
CSharpCompilationReference
(dummyCompilation4, ImmutableArray.Create("S")),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (46)
Attributes\AttributeTests.cs (4)
9952
var compilation2 = CreateCompilation(source2, new[] { new
CSharpCompilationReference
(compilation1) });
9971
var compilation3 = CreateCompilation(source3, new[] { new
CSharpCompilationReference
(compilation1) });
10034
var compilation2 = CreateCompilationWithMscorlib40(source2, new[] { new
CSharpCompilationReference
(compilation1) }, options: TestOptions.DebugDll, assemblyName: "Test.dll");
10045
var compilation3 = CreateCompilationWithMscorlib461(source2, new[] { new
CSharpCompilationReference
(compilation1) }, options: TestOptions.DebugDll);
Attributes\AttributeTests_Assembly.cs (3)
378
var neutralRef = new
CSharpCompilationReference
(neutral);
388
var deRef = new
CSharpCompilationReference
(de);
398
var en_usRef = new
CSharpCompilationReference
(en_us);
Attributes\AttributeTests_Experimental.cs (1)
104
var comp2B = CreateCompilation(source2, new[] { new
CSharpCompilationReference
(comp1) });
Attributes\AttributeTests_WellKnownAttributes.cs (10)
566
var libCompRef = new
CSharpCompilationReference
(libComp);
978
", new[] { new
CSharpCompilationReference
(c1) });
5273
var compref1 = new
CSharpCompilationReference
(comp1);
5275
var comp3 = CreateCompilation(text3, references: new[] { compref1, new
CSharpCompilationReference
(comp2) }, options: opt, assemblyName: "Child2");
5279
comp3 = CreateCompilation(text3, references: new[] { compref1, new
CSharpCompilationReference
(comp2) }, options: opt, assemblyName: "Child2");
6759
CreateCompilation(s, new[] { new
CSharpCompilationReference
(other) }).VerifyDiagnostics(
9844
var compilation2 = CreateEmptyCompilation(source2, WinRtRefs.Concat(new[] { new
CSharpCompilationReference
(compilation1) }), TestOptions.ReleaseDll);
9990
var compilation3 = CreateCompilationWithMscorlib40AndSystemCore(source2, new[] { new
CSharpCompilationReference
(compilation1) });
10073
var compilation3 = CreateCompilationWithMscorlib40AndSystemCore(source2, new[] { new
CSharpCompilationReference
(compilation1) });
10224
var compilation2 = CreateEmptyCompilation(source2, WinRtRefs.Concat(new[] { new
CSharpCompilationReference
(compilation1) }), TestOptions.ReleaseDll);
Attributes\InternalsVisibleToAndStrongNameTests.cs (24)
811
new[] { new
CSharpCompilationReference
(other) },
835
new[] { new
CSharpCompilationReference
(other) },
916
new MetadataReference[] { new
CSharpCompilationReference
(other) },
945
references: new[] { new
CSharpCompilationReference
(other) },
1104
new[] { new
CSharpCompilationReference
(other) },
1134
new[] { new
CSharpCompilationReference
(other) },
1163
new[] { new
CSharpCompilationReference
(other) },
1194
new MetadataReference[] { new
CSharpCompilationReference
(other) },
1229
new MetadataReference[] { new
CSharpCompilationReference
(other) },
1269
new MetadataReference[] { new
CSharpCompilationReference
(other) },
1301
new MetadataReference[] { new
CSharpCompilationReference
(other) },
1337
new MetadataReference[] { new
CSharpCompilationReference
(other) },
1382
new MetadataReference[] { new
CSharpCompilationReference
(giver) },
2087
var ref1 = new
CSharpCompilationReference
(comp1);
2091
var ref2 = new
CSharpCompilationReference
(comp2);
2206
var ref1 = new
CSharpCompilationReference
(comp1);
2210
var ref2 = new
CSharpCompilationReference
(comp2);
2214
var ref3 = new
CSharpCompilationReference
(comp3);
2373
var ref1 = new
CSharpCompilationReference
(comp1);
2415
CompileAndVerify(other.WithReferences(new[] { other.References.ElementAt(0), new
CSharpCompilationReference
(unsigned) })).VerifyDiagnostics();
2443
var comps = new[] {other.WithReferences(new []{other.References.ElementAt(0), new
CSharpCompilationReference
(unsigned)}),
2725
references: new[] { new
CSharpCompilationReference
(ca) },
2755
var cb = CreateCompilation(sourceB, options: TestOptions.ReleaseExe, assemblyName: "X", references: new[] { new
CSharpCompilationReference
(ca) }, parseOptions: parseOptions);
2783
var cb = CreateCompilation(sourceB, options: TestOptions.ReleaseExe, assemblyName: "X", references: new[] { new
CSharpCompilationReference
(ca) }, parseOptions: parseOptions);
FlowAnalysis\StructTests.cs (4)
544
var sourceReference = new
CSharpCompilationReference
(comp1);
604
var sourceReference = new
CSharpCompilationReference
(comp1);
637
var sourceReference = new
CSharpCompilationReference
(comp1);
682
var 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)
131
var comp1ref = new
CSharpCompilationReference
(comp1);
135
var comp2ref = new
CSharpCompilationReference
(comp2);
Semantics\BindingTests.cs (12)
1595
CSharpCompilation comp2 = CreateCompilationWithMscorlib461(source2, new MetadataReference[] { new
CSharpCompilationReference
(comp1, embedInteropTypes: true) }, assemblyName: "Bar948674_1");
1606
CSharpCompilation comp3 = CreateCompilationWithMscorlib461(source3, new MetadataReference[] { new
CSharpCompilationReference
(comp2), new
CSharpCompilationReference
(comp1, embedInteropTypes: true) });
1648
CSharpCompilation comp2 = CreateCompilationWithMscorlib461(source2, new MetadataReference[] { new
CSharpCompilationReference
(comp1, embedInteropTypes: true) }, assemblyName: "Bar948674_2");
1659
CSharpCompilation comp3 = CreateCompilationWithMscorlib461(source3, new MetadataReference[] { new
CSharpCompilationReference
(comp2), new
CSharpCompilationReference
(comp1, embedInteropTypes: true) });
1704
CSharpCompilation comp2 = CreateCompilationWithMscorlib461(source2, new MetadataReference[] { new
CSharpCompilationReference
(comp1, embedInteropTypes: true) }, assemblyName: "Bar948674_3");
1713
CSharpCompilation comp3 = CreateCompilationWithMscorlib461(source3, new MetadataReference[] { new
CSharpCompilationReference
(comp2), new
CSharpCompilationReference
(comp1, embedInteropTypes: true) });
1752
CSharpCompilation comp2 = CreateCompilationWithMscorlib461(source2, new MetadataReference[] { new
CSharpCompilationReference
(comp1, embedInteropTypes: true) }, assemblyName: "Bar948674_4");
1761
CSharpCompilation comp3 = CreateCompilationWithMscorlib461(source3, new MetadataReference[] { new
CSharpCompilationReference
(comp2), new
CSharpCompilationReference
(comp1, embedInteropTypes: true) });
Semantics\ColorColorTests.cs (2)
2105
new
CSharpCompilationReference
(refLib),
2148
new
CSharpCompilationReference
(refLib),
Semantics\ConstantTests.cs (4)
2845
var compilation2 = CreateCompilation(source2, new MetadataReference[] { new
CSharpCompilationReference
(compilation1) });
2886
var reference1 = new
CSharpCompilationReference
(compilation1);
2888
var reference2 = new
CSharpCompilationReference
(compilation2);
2890
var reference3 = new
CSharpCompilationReference
(compilation3);
Semantics\ImplicitObjectCreationTests.cs (3)
4402
new[] { new
CSharpCompilationReference
(libBv1) },
4418
var comp = CreateCompilation(source, new[] { new
CSharpCompilationReference
(libAv1), new
CSharpCompilationReference
(libBv2) },
Semantics\InheritanceBindingTests.cs (3)
6217
CreateCompilation(text2, new[] { new
CSharpCompilationReference
(comp1) }).VerifyDiagnostics(
6255
var comp = CreateCompilation(source2, new[] { new
CSharpCompilationReference
(compilation1) });
8237
var refs = new List<MetadataReference>(baseCompilations.Select(c => new
CSharpCompilationReference
(c)));
Semantics\InitOnlyMemberTests.cs (1)
4611
new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) },
Semantics\LambdaTests.cs (2)
382
new[] { new
CSharpCompilationReference
(comp1) });
433
new
CSharpCompilationReference
(comp1),
Semantics\NamedAndOptionalTests.cs (1)
1679
var exeComp = CreateCompilation(main, new[] { new
CSharpCompilationReference
(libComp) }, options: TestOptions.ReleaseExe, assemblyName: "Main");
Semantics\NullableReferenceTypesTests.cs (10)
8813
var compRefs0 = new MetadataReference[] { new
CSharpCompilationReference
(comp0) };
8836
compRefs0 = new MetadataReference[] { new
CSharpCompilationReference
(comp0) };
8866
compRefs0 = new MetadataReference[] { new
CSharpCompilationReference
(comp0) };
8945
var comp1A = CreateCompilation(source1, references: new MetadataReference[] { new
CSharpCompilationReference
(comp0) });
8995
var comp1A = CreateCompilation(source1, references: new[] { new
CSharpCompilationReference
(comp0) });
9159
references: new MetadataReference[] { new
CSharpCompilationReference
(comp0) });
9427
var comp1 = CreateCompilation(source1, references: new MetadataReference[] { new
CSharpCompilationReference
(comp0) });
76970
new MetadataReference[] { new
CSharpCompilationReference
(piaCompilation, embedInteropTypes: true) },
111692
var comp = CreateCompilation(new[] { source }, options: WithNullableEnable(), references: new[] { new
CSharpCompilationReference
(comp0) });
111710
comp = CreateCompilation(new[] { source }, options: WithNullableEnable(), references: new[] { new
CSharpCompilationReference
(comp0) });
Semantics\OverloadResolutionTests.cs (2)
2306
", new MetadataReference[] { new
CSharpCompilationReference
(cCommon) }, assemblyName: "cCS");
2330
new MetadataReference[] { new
CSharpCompilationReference
(cCommon) });
Semantics\StructsTests.cs (2)
383
new[] { MscorlibRef, new
CSharpCompilationReference
(c1) },
386
var c1AsmRef = c2.GetReferencedAssemblySymbol(new
CSharpCompilationReference
(c1));
Semantics\UseSiteErrorTests.cs (7)
1093
var main = CreateCompilation(mainSource, new[] { new
CSharpCompilationReference
(lib) }, assemblyName: "Main");
1125
var main = CreateCompilation(mainSource, new[] { new
CSharpCompilationReference
(lib) }, assemblyName: "Main");
1154
var main = CreateCompilation(mainSource, new[] { new
CSharpCompilationReference
(lib) }, assemblyName: "Main");
1251
var derivedLib = CreateCompilation(derivedSource, assemblyName: "DerivedAssembly", references: new[] { new
CSharpCompilationReference
(baseLib) });
1267
CreateCompilation(programSource, references: new[] { new
CSharpCompilationReference
(derivedLib) }).VerifyDiagnostics(
2195
CSharpCompilation comp2 = CreateCompilation(source2, new MetadataReference[] { new
CSharpCompilationReference
(comp1) });
2213
CSharpCompilation comp3 = CreateCompilation(source3, new MetadataReference[] { new
CSharpCompilationReference
(comp2) });
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (284)
BadSymbolReference.cs (12)
464
var compilation3 = CreateCompilation(a_cs, new MetadataReference[] { new
CSharpCompilationReference
(cl3Compilation) });
470
var compilation4 = CreateCompilation(a_cs, new MetadataReference[] { new
CSharpCompilationReference
(cl3BadCompilation1) });
601
var compilation5 = CreateCompilation(a_cs, new MetadataReference[] { new
CSharpCompilationReference
(cl3BadCompilation2) });
842
var lib1Ref = new
CSharpCompilationReference
(lib1);
852
var lib2Ref = new
CSharpCompilationReference
(lib2);
867
var lib3Ref = new
CSharpCompilationReference
(lib3);
1031
var lib1Ref = new
CSharpCompilationReference
(lib1);
1053
var lib2Ref = new
CSharpCompilationReference
(lib2);
1079
var lib3Ref = new
CSharpCompilationReference
(lib3);
1316
var lib1Ref = new
CSharpCompilationReference
(lib1);
1325
var lib2Ref = new
CSharpCompilationReference
(lib2);
1334
var lib3Ref = new
CSharpCompilationReference
(lib3);
Compilation\GetUnusedImportDirectivesTests.cs (1)
347
var comp = CreateCompilation(source, new[] { new
CSharpCompilationReference
(lib, aliases: ImmutableArray.Create("A")) });
Compilation\ReferenceManagerTests.cs (49)
70
var testRefV1 = CreateCompilation("public class E : D { }", new MetadataReference[] { new
CSharpCompilationReference
(refV1), v2 }, assemblyName: "testRefV1");
73
var testRefV2 = CreateCompilation("public class E : D { }", new MetadataReference[] { new
CSharpCompilationReference
(refV2), v1 }, assemblyName: "testRefV2");
112
var testRefV1 = CreateCompilation("public class E { }", new MetadataReference[] { new
CSharpCompilationReference
(refV1), v2 });
115
var testRefV2 = CreateCompilation("public class E { }", new MetadataReference[] { new
CSharpCompilationReference
(refV2), v1 });
165
references: new[] { new
CSharpCompilationReference
(libV2) },
185
new
CSharpCompilationReference
(libV1),
186
new
CSharpCompilationReference
(libV3),
187
new
CSharpCompilationReference
(refLibV2)
205
new
CSharpCompilationReference
(libV3),
206
new
CSharpCompilationReference
(libV1),
207
new
CSharpCompilationReference
(refLibV2)
297
references: new[] { new
CSharpCompilationReference
(libV1) },
310
references: new[] { new
CSharpCompilationReference
(refLibV1), new
CSharpCompilationReference
(libV1) },
346
references: new[] { new
CSharpCompilationReference
(refLibV1), new
CSharpCompilationReference
(libV2), new
CSharpCompilationReference
(x) });
452
references: new[] { new
CSharpCompilationReference
(a1), new
CSharpCompilationReference
(b2) },
469
references: new[] { new
CSharpCompilationReference
(refA1B2), new
CSharpCompilationReference
(a2), new
CSharpCompilationReference
(b1) });
559
references: new MetadataReference[] { MinCorlibRef, new
CSharpCompilationReference
(libV1) },
573
references: new MetadataReference[] { MinCorlibRef, new
CSharpCompilationReference
(refLibV1), new
CSharpCompilationReference
(libV2) });
617
references: new[] { new
CSharpCompilationReference
(libV1) },
632
references: new[] { new
CSharpCompilationReference
(refLibV1), new
CSharpCompilationReference
(libV2) });
689
references: new[] { new
CSharpCompilationReference
(libV1) },
707
references: new MetadataReference[] { MetadataReference.CreateFromImage(refLibV1.EmitToArray()), new
CSharpCompilationReference
(libV2) },
1095
new[] { new
CSharpCompilationReference
(libV1) },
1099
new[] { new
CSharpCompilationReference
(libV1), new
CSharpCompilationReference
(refLibV1), new
CSharpCompilationReference
(libV2) },
1393
var b = CreateCompilation(sourceB, new[] { new
CSharpCompilationReference
(a) }, assemblyName: "B");
1440
var b = CreateCompilation("public class B : A { } ", new[] { new
CSharpCompilationReference
(a) }, assemblyName: "B");
1889
var r1 = new
CSharpCompilationReference
(pl);
1927
new[] { new
CSharpCompilationReference
(libBv1) },
1942
var comp = CreateCompilation(source, new[] { new
CSharpCompilationReference
(libAv1), new
CSharpCompilationReference
(libBv2) });
1971
new[] { new
CSharpCompilationReference
(libBv1) },
1986
var comp = CreateCompilation(source, new[] { new
CSharpCompilationReference
(libAv1), new
CSharpCompilationReference
(libBv2) });
2013
var libAv1 = CreateCompilation(libASource, new[] { new
CSharpCompilationReference
(libBv1) }, assemblyName: "A", options: s_signedDll);
2026
var comp = CreateCompilation(source, new[] { new
CSharpCompilationReference
(libAv1), new
CSharpCompilationReference
(libBv2) });
2087
var libAv1 = CreateCompilation(libASource, new[] { new
CSharpCompilationReference
(libBv1) }, assemblyName: "A", options: s_signedDll);
2101
var comp = CreateCompilation(source, new[] { new
CSharpCompilationReference
(libAv1), new
CSharpCompilationReference
(libBv2) });
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
3100
var ref1 = new
CSharpCompilationReference
(comp1);
3964
var c2 = CreateCompilation(tree2, references: new[] { new
CSharpCompilationReference
(c1) });
Compilation\SemanticModelGetSemanticInfoTests.cs (1)
14984
}", references: new[] { new
CSharpCompilationReference
(pia, embedInteropTypes: true) });
DocumentationComments\CrefTests.cs (9)
2000
var compilation = CreateCompilationWithMscorlib40AndDocumentationComments(source, new[] { new
CSharpCompilationReference
(lib1), new
CSharpCompilationReference
(lib2) });
2042
var compilation = CreateCompilationWithMscorlib40AndDocumentationComments(source, new[] { new
CSharpCompilationReference
(lib1), new
CSharpCompilationReference
(lib2) });
2093
var compilation = CreateCompilationWithMscorlib40AndDocumentationComments(source, new[] { new
CSharpCompilationReference
(lib1), new
CSharpCompilationReference
(lib2) });
2135
var compilation = CreateCompilationWithMscorlib40AndDocumentationComments(source, new[] { new
CSharpCompilationReference
(lib, aliases: ImmutableArray.Create("LibAlias")) });
2165
var compilation = CreateCompilationWithMscorlib40AndDocumentationComments(source, new[] { new
CSharpCompilationReference
(lib, aliases: ImmutableArray.Create("LibAlias")) });
2195
var compilation = CreateCompilationWithMscorlib40AndDocumentationComments(source, new[] { new
CSharpCompilationReference
(lib, aliases: ImmutableArray.Create("LibAlias")) });
SymbolDisplay\SymbolDisplayTests.cs (1)
4847
var compref = new
CSharpCompilationReference
(complib);
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (3)
199
var comp1ref = new
CSharpCompilationReference
(comp1);
203
var comp2ref = new
CSharpCompilationReference
(comp2);
860
var compref = new
CSharpCompilationReference
(comp0);
Symbols\AssemblyAndNamespaceTests.cs (6)
119
var compRef = new
CSharpCompilationReference
(comp1);
162
var compRef = new
CSharpCompilationReference
(comp1);
205
var compRef1 = new
CSharpCompilationReference
(comp1);
206
var compRef2 = new
CSharpCompilationReference
(comp2);
254
var compRef1 = new
CSharpCompilationReference
(comp1);
255
var compRef2 = new
CSharpCompilationReference
(comp2);
Symbols\CompilationCreationTests.cs (29)
1435
new
CSharpCompilationReference
(varC_MTTestLib2)
1474
new
CSharpCompilationReference
(varC_MTTestLib2),
1491
new
CSharpCompilationReference
(varC_MTTestLib2),
1492
new
CSharpCompilationReference
(varC_MTTestLib3)
1559
new
CSharpCompilationReference
(varC_MTTestLib2),
1560
new
CSharpCompilationReference
(varC_MTTestLib3),
1578
new
CSharpCompilationReference
(varC_MTTestLib2),
1579
new
CSharpCompilationReference
(varC_MTTestLib3),
1580
new
CSharpCompilationReference
(varC_MTTestLib4)
1682
new
CSharpCompilationReference
(varC_MTTestLib3)
1694
new
CSharpCompilationReference
(varC_MTTestLib2)
1706
new
CSharpCompilationReference
(varC_MTTestLib2),
1707
new
CSharpCompilationReference
(varC_MTTestLib3),
1708
new
CSharpCompilationReference
(varC_MTTestLib4)
1783
new
CSharpCompilationReference
(varC_MTTestLib4),
1784
new
CSharpCompilationReference
(varC_MTTestLib2),
1785
new
CSharpCompilationReference
(varC_MTTestLib3)
1802
new
CSharpCompilationReference
(varC_MTTestLib4)
1815
new
CSharpCompilationReference
(varC_MTTestLib2),
1816
new
CSharpCompilationReference
(varC_MTTestLib3),
1817
new
CSharpCompilationReference
(varC_MTTestLib4)
2235
new
CSharpCompilationReference
(localC1_V1),
2236
new
CSharpCompilationReference
(localC4_V1),
2237
new
CSharpCompilationReference
(c7)
2256
new
CSharpCompilationReference
(c3),
2257
new
CSharpCompilationReference
(localC1_V2),
2258
new
CSharpCompilationReference
(localC4_V2),
2259
new
CSharpCompilationReference
(c7)
2562
new
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)
1525
var compilation2 = CreateCompilationWithMscorlib461(new SyntaxTree[] { }, references: new[] { new
CSharpCompilationReference
(compilation1) });
Symbols\ExtensionMethodTests.cs (3)
2842
var compilation2 = CreateCompilation(source2, references: new[] { new
CSharpCompilationReference
(compilation1) }, parseOptions: TestOptions.Regular8);
2861
compilation2 = CreateCompilation(source2, references: new[] { new
CSharpCompilationReference
(compilation1) }, parseOptions: TestOptions.Regular7);
3103
var libReference = new
CSharpCompilationReference
(libCompilation);
Symbols\GenericConstraintTests.cs (4)
3081
var compilation2 = CreateCompilation(source2, assemblyName: "d03a3229-eb22-4682-88df-77efaa348e3b", references: new MetadataReference[] { new
CSharpCompilationReference
(compilation1) });
3097
var compilation3 = CreateCompilation(source3, references: new MetadataReference[] { new
CSharpCompilationReference
(compilation2) });
6469
var compilation2 = CreateCompilation(source2, references: new MetadataReference[] { new
CSharpCompilationReference
(compilation1) });
6473
var compilation3 = CreateCompilation(source3, references: new MetadataReference[] { new
CSharpCompilationReference
(compilation2) });
Symbols\IndexerTests.cs (1)
2835
var comp2 = CreateCompilation(src2, new[] { new
CSharpCompilationReference
(comp1) });
Symbols\InterfaceImplementationTests.cs (8)
234
var comp1ref = new
CSharpCompilationReference
(comp1);
238
var comp2ref = new
CSharpCompilationReference
(comp2);
306
var comp1ref = new
CSharpCompilationReference
(comp1);
310
var comp2ref = new
CSharpCompilationReference
(comp2);
420
var comp1ref = new
CSharpCompilationReference
(comp1);
424
var comp2ref = new
CSharpCompilationReference
(comp2);
973
references: new MetadataReference[] { new
CSharpCompilationReference
(comp1) },
1894
var ref1 = new
CSharpCompilationReference
(comp1);
Symbols\Metadata\PE\NoPia.cs (16)
654
new
CSharpCompilationReference
(localTypes1)
667
new
CSharpCompilationReference
(localTypes1));
1108
var pia5Link = new
CSharpCompilationReference
(varC_Pia5, embedInteropTypes: true);
1109
var pia5Ref = new
CSharpCompilationReference
(varC_Pia5, embedInteropTypes: false);
1116
var pia1Link = new
CSharpCompilationReference
(varC_Pia1, embedInteropTypes: true);
1117
var pia1Ref = new
CSharpCompilationReference
(varC_Pia1, embedInteropTypes: false);
1124
var library2Ref = new
CSharpCompilationReference
(varC_Library2, embedInteropTypes: false);
1125
var library2Link = new
CSharpCompilationReference
(varC_Library2, embedInteropTypes: true);
1269
var varALink = new
CSharpCompilationReference
(varC_A, embedInteropTypes: true);
1270
var varARef = new
CSharpCompilationReference
(varC_A, embedInteropTypes: false);
1274
var varBLink = new
CSharpCompilationReference
(varC_B, embedInteropTypes: true);
1275
var varBRef = new
CSharpCompilationReference
(varC_B, embedInteropTypes: false);
1279
var varCLink = new
CSharpCompilationReference
(varC_C, embedInteropTypes: true);
1280
var varCRef = new
CSharpCompilationReference
(varC_C, embedInteropTypes: false);
1284
var varDLink = new
CSharpCompilationReference
(varC_D, embedInteropTypes: true);
1285
var varDRef = new
CSharpCompilationReference
(varC_D, embedInteropTypes: false);
Symbols\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.cs (1)
561
new
CSharpCompilationReference
(localType)
Symbols\Metadata\PE\NoPiaLocalHideAndTypeSubstitutionTests.cs (7)
83
new
CSharpCompilationReference
(localType1)
90
new
CSharpCompilationReference
(localType2),
91
new
CSharpCompilationReference
(localType1)
426
references: new List<MetadataReference>() { new
CSharpCompilationReference
(localType1, embedInteropTypes: true) });
432
new
CSharpCompilationReference
(localType2),
433
new
CSharpCompilationReference
(localType1)
473
new
CSharpCompilationReference
(localType)
Symbols\Metadata\PE\TypeForwarders.cs (15)
1618
var modCompilation = CreateCompilation(mod, references: new[] { new
CSharpCompilationReference
(forwardedTypesCompilation) }, options: TestOptions.ReleaseModule);
1628
var appCompilation = CreateCompilation(app, references: new[] { modRef1, new
CSharpCompilationReference
(forwardedTypesCompilation) }, options: TestOptions.ReleaseDll);
1684
appCompilation = CreateCompilation(app, references: new MetadataReference[] { modRef2, new
CSharpCompilationReference
(forwardedTypesCompilation) }, options: TestOptions.ReleaseDll);
1706
appCompilation = 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");
1857
var cA_v3 = CreateCompilation(@"", new[] { cD_ImageRef, new
CSharpCompilationReference
(cC_v1) }, options: TestOptions.ReleaseDll, assemblyName: "A");
1868
new
CSharpCompilationReference
(cA_v2),
1869
new
CSharpCompilationReference
(cA_v3)
1874
new
CSharpCompilationReference
(cB),
1880
new
CSharpCompilationReference
(cC_v1),
1881
new
CSharpCompilationReference
(cC_v2),
1961
comp = CreateCompilation(sourceProgram, references: new[] { refA1, new
CSharpCompilationReference
(compB2, aliases: ImmutableArray.Create("B")), refBImpl });
2025
comp = CreateCompilation(sourceProgram, references: new[] { refA1, new
CSharpCompilationReference
(compB2, aliases: ImmutableArray.Create("B")), refBImpl });
Symbols\OverriddenOrHiddenMembersTests.cs (4)
735
var comp1ref = new
CSharpCompilationReference
(comp1);
739
var comp2ref = new
CSharpCompilationReference
(comp2);
2195
", new MetadataReference[] { new
CSharpCompilationReference
(c1) });
2238
", new MetadataReference[] { new
CSharpCompilationReference
(c1) });
Symbols\Retargeting\NoPia.cs (32)
955
references: new MetadataReference[] { new
CSharpCompilationReference
(Pia1, embedInteropTypes: true) });
960
references: new MetadataReference[] { new
CSharpCompilationReference
(Pia1, embedInteropTypes: true) });
1261
var localTypes1Ref = new
CSharpCompilationReference
(LocalTypes1);
1287
var localTypes1Ref = new
CSharpCompilationReference
(LocalTypes1);
1311
var piaRef = new
CSharpCompilationReference
(Pia1);
1314
references: new MetadataReference[] { new
CSharpCompilationReference
(Pia1, embedInteropTypes: true) });
1317
var localTypes1Ref = new
CSharpCompilationReference
(LocalTypes1);
1850
references: new MetadataReference[] { new
CSharpCompilationReference
(pia).WithEmbedInteropTypes(true) });
1938
references: new MetadataReference[] { new
CSharpCompilationReference
(Pia1, embedInteropTypes: true) });
2047
references: new MetadataReference[] {new
CSharpCompilationReference
(localTypes2),
2048
new
CSharpCompilationReference
(pia)});
2063
new
CSharpCompilationReference
(pia)});
2077
references: new MetadataReference[] {new
CSharpCompilationReference
(localTypes2),
2172
references: new MetadataReference[] {new
CSharpCompilationReference
(localTypes2),
2173
new
CSharpCompilationReference
(pia)});
2188
new
CSharpCompilationReference
(pia)});
2202
references: new MetadataReference[] {new
CSharpCompilationReference
(localTypes2),
2297
references: new MetadataReference[] {new
CSharpCompilationReference
(localTypes2),
2298
new
CSharpCompilationReference
(pia)});
2313
new
CSharpCompilationReference
(pia)});
2327
references: new MetadataReference[] {new
CSharpCompilationReference
(localTypes2),
2404
references: new MetadataReference[] { new
CSharpCompilationReference
(pia, embedInteropTypes: true) });
2409
references: new MetadataReference[] {new
CSharpCompilationReference
(localTypes2),
2410
new
CSharpCompilationReference
(pia)});
2424
references: new MetadataReference[] {new
CSharpCompilationReference
(localTypes2),
2505
references: new MetadataReference[] {new
CSharpCompilationReference
(localTypes2),
2506
new
CSharpCompilationReference
(pia)});
2521
new
CSharpCompilationReference
(pia)});
2535
references: new MetadataReference[] {new
CSharpCompilationReference
(localTypes2),
2600
references: new[] { new
CSharpCompilationReference
(pia1, embedInteropTypes: true) });
2618
references: new[] { new
CSharpCompilationReference
(multiModule),
2619
new
CSharpCompilationReference
(pia1)});
Symbols\Retargeting\RetargetCustomAttributes.cs (3)
70
c1 = new
CSharpCompilationReference
(compilation1);
75
c2 = new
CSharpCompilationReference
(compilation2);
299
var c2 = CreateEmptyCompilation(source2, new MetadataReference[] { NewMsCorLib, new
CSharpCompilationReference
(c1) });
Symbols\Retargeting\RetargetCustomModifiers.cs (2)
37
CSharpCompilation c2 = CSharpCompilation.Create("C2", references: new MetadataReference[] { newMsCorLib, new
CSharpCompilationReference
(c1) });
151
var r1 = new
CSharpCompilationReference
(c1);
Symbols\Retargeting\RetargetExplicitInterfaceImplementation.cs (2)
117
new
CSharpCompilationReference
(comp1)
381
new
CSharpCompilationReference
(comp1)
Symbols\Retargeting\RetargetingTests.cs (4)
260
var compilation2 = CreateCompilation(source2, new[] { new
CSharpCompilationReference
(compilation1_v1) }, assemblyName: "assembly2");
262
var compilation2Ref = new
CSharpCompilationReference
(compilation2);
264
var compilation3 = CreateCompilation("", new[] { compilation2Ref, new
CSharpCompilationReference
(compilation1_v2) }, assemblyName: "assembly3");
735
var comp2 = CreateEmptyCompilation("", new[] { MscorlibRef_v4_0_30316_17626, new
CSharpCompilationReference
(comp1) }, TestOptions.ReleaseDll);
Symbols\Source\BaseClassTests.cs (7)
1032
var comp2 = CreateCompilation(text, new MetadataReference[] { ClassAv2, new
CSharpCompilationReference
(comp) });
1091
new
CSharpCompilationReference
(comp)
1160
new
CSharpCompilationReference
(comp),
1217
new
CSharpCompilationReference
(comp)
1615
CSharpCompilation c2 = CreateCompilation(textB, new[] { new
CSharpCompilationReference
(c1) });
1652
var compilation2 = CreateCompilation(source2, new[] { new
CSharpCompilationReference
(compilation1) }, assemblyName: "Two");
1844
var compilation2 = CreateCompilation(source2, new[] { new
CSharpCompilationReference
(compilation1) }, assemblyName: "Two");
Symbols\Source\EventTests.cs (1)
507
var libCompRef = new
CSharpCompilationReference
(libComp);
Symbols\Source\ExternAliasTests.cs (1)
471
var libRef = new
CSharpCompilationReference
(CreateCompilation(libSource, assemblyName: "lib"), aliases: ImmutableArray.Create("A"));
Symbols\Source\MethodTests.cs (4)
757
var compRef1 = new
CSharpCompilationReference
(comp1);
763
var compRef2 = new
CSharpCompilationReference
(comp2);
1046
var compRef1 = new
CSharpCompilationReference
(comp1);
1052
var compRef2 = new
CSharpCompilationReference
(comp2);
Symbols\SymbolDistinguisherTests.cs (4)
77
var libRef = new
CSharpCompilationReference
(CreateCompilation(Parse(source, "file1.cs"), assemblyName: "Metadata"));
117
var libRef = new
CSharpCompilationReference
(CreateCompilation(tree, assemblyName: "Metadata"));
579
var libRef = new
CSharpCompilationReference
(CreateCompilation(Parse(libSource, "file.cs"), assemblyName: "Metadata"));
781
var ref0 = new
CSharpCompilationReference
(comp0);
Symbols\SymbolEqualityTests.cs (1)
341
var comp2 = (Compilation)CreateCompilation(source2, new[] { new
CSharpCompilationReference
((CSharpCompilation)comp1) });
Symbols\SymbolErrorTests.cs (34)
5676
new
CSharpCompilationReference
(lib)
5737
new
CSharpCompilationReference
(lib)
5797
new
CSharpCompilationReference
(lib)
5858
new
CSharpCompilationReference
(lib)
5917
new
CSharpCompilationReference
(lib)
5974
new
CSharpCompilationReference
(lib)
6033
new
CSharpCompilationReference
(lib)
6092
new
CSharpCompilationReference
(lib)
6290
new
CSharpCompilationReference
(lib)
6351
new
CSharpCompilationReference
(lib)
6412
new
CSharpCompilationReference
(lib)
6473
new
CSharpCompilationReference
(lib)
6537
new
CSharpCompilationReference
(lib)
6600
new
CSharpCompilationReference
(lib)
6664
new
CSharpCompilationReference
(lib)
6734
new
CSharpCompilationReference
(lib)
6797
new
CSharpCompilationReference
(lib)
6867
new
CSharpCompilationReference
(lib)
7266
var forwardedTypes1Ref = new
CSharpCompilationReference
(forwardedTypes1);
7269
var forwardedTypes2Ref = new
CSharpCompilationReference
(forwardedTypes2);
7343
new
CSharpCompilationReference
(forwardedTypes1, aliases: ImmutableArray.Create("FT1"))
7362
new
CSharpCompilationReference
(forwardedTypes1, ImmutableArray.Create("FT1"))
13877
var compRef1 = new
CSharpCompilationReference
(comp1);
16260
var ref1 = new
CSharpCompilationReference
(comp1);
16328
var ref1 = new
CSharpCompilationReference
(comp, embedInteropTypes: true);
16356
var ref1 = new
CSharpCompilationReference
(comp);
16394
var ref1 = new
CSharpCompilationReference
(comp, embedInteropTypes: true);
16597
var ref1 = new
CSharpCompilationReference
(comp, embedInteropTypes: true);
17797
new
CSharpCompilationReference
(ref1),
17798
new
CSharpCompilationReference
(ref2),
17878
new
CSharpCompilationReference
(ref1),
17879
new
CSharpCompilationReference
(ref2),
20439
", new[] { new
CSharpCompilationReference
(comp1) }, options: TestOptions.ReleaseDll);
20453
var comp3 = CreateCompilation(source3, new[] { new
CSharpCompilationReference
(comp2) }, options: TestOptions.ReleaseDll);
Symbols\TypeResolutionTests.cs (6)
68
new
CSharpCompilationReference
(c1),
78
new
CSharpCompilationReference
(c2),
91
new
CSharpCompilationReference
(c1),
92
new
CSharpCompilationReference
(c2),
172
new
CSharpCompilationReference
(c1),
173
new
CSharpCompilationReference
(c2)
Symbols\TypeTests.cs (8)
191
var compRef1 = new
CSharpCompilationReference
(comp1);
195
var compRef2 = new
CSharpCompilationReference
(comp2);
379
var compRef1 = new
CSharpCompilationReference
(comp1);
398
compRef1 = new
CSharpCompilationReference
(comp1);
417
compRef1 = new
CSharpCompilationReference
(comp1);
440
compRef1 = new
CSharpCompilationReference
(comp1);
782
var compilation3 = CreateCompilation(testText, new[] { new
CSharpCompilationReference
(compilation1), new
CSharpCompilationReference
(compilation2) });
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
MetadataTestHelpers.cs (1)
54
refs.Add(new
CSharpCompilationReference
(c));
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
CodeGen\WinMdEventTests.cs (1)
627
var 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)
412
var validatedReferences = ValidateReferences<
CSharpCompilationReference
>(references);
633
ValidateReferences<
CSharpCompilationReference
>(references),
Symbols\ReferenceManager.cs (2)
86
var
csReference = compilationReference as
CSharpCompilationReference
;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (8)
Emit\CompilationEmitTests.cs (4)
4682
var
compRef = new CSharpCompilationReference(refCompilation);
4812
var
compRef = new CSharpCompilationReference(refCompilation);
4899
var
compRef = new CSharpCompilationReference(refCompilation);
4976
var
compRef = new CSharpCompilationReference(refCompilation);
Emit\DeterministicTests.cs (3)
300
var
forwardedToReference1 = new CSharpCompilationReference(forwardedToCompilation1);
318
var
forwardingReference = new CSharpCompilationReference(forwardingCompilation);
353
var
forwardedToReference2 = new CSharpCompilationReference(forwardedToCompilation2);
Emit\NoPiaEmbedTypes.cs (1)
5706
var
piaRef1 = new CSharpCompilationReference(piaCompilation, embedInteropTypes: true);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (15)
Attributes\AttributeTests_Assembly.cs (3)
378
var
neutralRef = new CSharpCompilationReference(neutral);
388
var
deRef = new CSharpCompilationReference(de);
398
var
en_usRef = new CSharpCompilationReference(en_us);
Attributes\AttributeTests_WellKnownAttributes.cs (2)
566
var
libCompRef = new CSharpCompilationReference(libComp);
5273
var
compref1 = new CSharpCompilationReference(comp1);
Attributes\InternalsVisibleToAndStrongNameTests.cs (6)
2087
var
ref1 = new CSharpCompilationReference(comp1);
2091
var
ref2 = new CSharpCompilationReference(comp2);
2206
var
ref1 = new CSharpCompilationReference(comp1);
2210
var
ref2 = new CSharpCompilationReference(comp2);
2214
var
ref3 = new CSharpCompilationReference(comp3);
2373
var
ref1 = new CSharpCompilationReference(comp1);
FlowAnalysis\StructTests.cs (4)
544
var
sourceReference = new CSharpCompilationReference(comp1);
604
var
sourceReference = new CSharpCompilationReference(comp1);
637
var
sourceReference = new CSharpCompilationReference(comp1);
682
var
sourceReference = new CSharpCompilationReference(comp1);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\AmbiguousOverrideTests.cs (2)
131
var
comp1ref = new CSharpCompilationReference(comp1);
135
var
comp2ref = new CSharpCompilationReference(comp2);
Semantics\ConstantTests.cs (3)
2886
var
reference1 = new CSharpCompilationReference(compilation1);
2888
var
reference2 = new CSharpCompilationReference(compilation2);
2890
var
reference3 = new CSharpCompilationReference(compilation3);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (74)
BadSymbolReference.cs (9)
842
var
lib1Ref = new CSharpCompilationReference(lib1);
852
var
lib2Ref = new CSharpCompilationReference(lib2);
867
var
lib3Ref = new CSharpCompilationReference(lib3);
1031
var
lib1Ref = new CSharpCompilationReference(lib1);
1053
var
lib2Ref = new CSharpCompilationReference(lib2);
1079
var
lib3Ref = new CSharpCompilationReference(lib3);
1316
var
lib1Ref = new CSharpCompilationReference(lib1);
1325
var
lib2Ref = new CSharpCompilationReference(lib2);
1334
var
lib3Ref = new CSharpCompilationReference(lib3);
Compilation\CompilationAPITests.cs (1)
1285
Assert.True(comp.ExternalReferences[2] is
CSharpCompilationReference
, "Expected compilation reference");
Compilation\ReferenceManagerTests.cs (1)
1889
var
r1 = new CSharpCompilationReference(pl);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
3100
var
ref1 = new CSharpCompilationReference(comp1);
SymbolDisplay\SymbolDisplayTests.cs (1)
4847
var
compref = new CSharpCompilationReference(complib);
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (3)
199
var
comp1ref = new CSharpCompilationReference(comp1);
203
var
comp2ref = new CSharpCompilationReference(comp2);
860
var
compref = new CSharpCompilationReference(comp0);
Symbols\AssemblyAndNamespaceTests.cs (6)
119
var
compRef = new CSharpCompilationReference(comp1);
162
var
compRef = new CSharpCompilationReference(comp1);
205
var
compRef1 = new CSharpCompilationReference(comp1);
206
var
compRef2 = new CSharpCompilationReference(comp2);
254
var
compRef1 = new CSharpCompilationReference(comp1);
255
var
compRef2 = new CSharpCompilationReference(comp2);
Symbols\ExtensionMethodTests.cs (1)
3103
var
libReference = new CSharpCompilationReference(libCompilation);
Symbols\InterfaceImplementationTests.cs (7)
234
var
comp1ref = new CSharpCompilationReference(comp1);
238
var
comp2ref = new CSharpCompilationReference(comp2);
306
var
comp1ref = new CSharpCompilationReference(comp1);
310
var
comp2ref = new CSharpCompilationReference(comp2);
420
var
comp1ref = new CSharpCompilationReference(comp1);
424
var
comp2ref = new CSharpCompilationReference(comp2);
1894
var
ref1 = new CSharpCompilationReference(comp1);
Symbols\Metadata\PE\NoPia.cs (14)
1108
var
pia5Link = new CSharpCompilationReference(varC_Pia5, embedInteropTypes: true);
1109
var
pia5Ref = new CSharpCompilationReference(varC_Pia5, embedInteropTypes: false);
1116
var
pia1Link = new CSharpCompilationReference(varC_Pia1, embedInteropTypes: true);
1117
var
pia1Ref = new CSharpCompilationReference(varC_Pia1, embedInteropTypes: false);
1124
var
library2Ref = new CSharpCompilationReference(varC_Library2, embedInteropTypes: false);
1125
var
library2Link = new CSharpCompilationReference(varC_Library2, embedInteropTypes: true);
1269
var
varALink = new CSharpCompilationReference(varC_A, embedInteropTypes: true);
1270
var
varARef = new CSharpCompilationReference(varC_A, embedInteropTypes: false);
1274
var
varBLink = new CSharpCompilationReference(varC_B, embedInteropTypes: true);
1275
var
varBRef = new CSharpCompilationReference(varC_B, embedInteropTypes: false);
1279
var
varCLink = new CSharpCompilationReference(varC_C, embedInteropTypes: true);
1280
var
varCRef = new CSharpCompilationReference(varC_C, embedInteropTypes: false);
1284
var
varDLink = new CSharpCompilationReference(varC_D, embedInteropTypes: true);
1285
var
varDRef = new CSharpCompilationReference(varC_D, embedInteropTypes: false);
Symbols\OverriddenOrHiddenMembersTests.cs (2)
735
var
comp1ref = new CSharpCompilationReference(comp1);
739
var
comp2ref = new CSharpCompilationReference(comp2);
Symbols\Retargeting\NoPia.cs (4)
1261
var
localTypes1Ref = new CSharpCompilationReference(LocalTypes1);
1287
var
localTypes1Ref = new CSharpCompilationReference(LocalTypes1);
1311
var
piaRef = new CSharpCompilationReference(Pia1);
1317
var
localTypes1Ref = new CSharpCompilationReference(LocalTypes1);
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
24
public
CSharpCompilationReference
c1, c2;
Symbols\Retargeting\RetargetCustomModifiers.cs (1)
151
var
r1 = new CSharpCompilationReference(c1);
Symbols\Retargeting\RetargetingTests.cs (1)
262
var
compilation2Ref = new CSharpCompilationReference(compilation2);
Symbols\Source\EventTests.cs (1)
507
var
libCompRef = new CSharpCompilationReference(libComp);
Symbols\Source\ExternAliasTests.cs (1)
471
var
libRef = new CSharpCompilationReference(CreateCompilation(libSource, assemblyName: "lib"), aliases: ImmutableArray.Create("A"));
Symbols\Source\MethodTests.cs (4)
757
var
compRef1 = new CSharpCompilationReference(comp1);
763
var
compRef2 = new CSharpCompilationReference(comp2);
1046
var
compRef1 = new CSharpCompilationReference(comp1);
1052
var
compRef2 = new CSharpCompilationReference(comp2);
Symbols\SymbolDistinguisherTests.cs (4)
77
var
libRef = new CSharpCompilationReference(CreateCompilation(Parse(source, "file1.cs"), assemblyName: "Metadata"));
117
var
libRef = new CSharpCompilationReference(CreateCompilation(tree, assemblyName: "Metadata"));
579
var
libRef = new CSharpCompilationReference(CreateCompilation(Parse(libSource, "file.cs"), assemblyName: "Metadata"));
781
var
ref0 = new CSharpCompilationReference(comp0);
Symbols\SymbolErrorTests.cs (8)
7266
var
forwardedTypes1Ref = new CSharpCompilationReference(forwardedTypes1);
7269
var
forwardedTypes2Ref = new CSharpCompilationReference(forwardedTypes2);
13877
var
compRef1 = new CSharpCompilationReference(comp1);
16260
var
ref1 = new CSharpCompilationReference(comp1);
16328
var
ref1 = new CSharpCompilationReference(comp, embedInteropTypes: true);
16356
var
ref1 = new CSharpCompilationReference(comp);
16394
var
ref1 = new CSharpCompilationReference(comp, embedInteropTypes: true);
16597
var
ref1 = new CSharpCompilationReference(comp, embedInteropTypes: true);
Symbols\TypeTests.cs (3)
191
var
compRef1 = new CSharpCompilationReference(comp1);
195
var
compRef2 = new CSharpCompilationReference(comp2);
379
var
compRef1 = new CSharpCompilationReference(comp1);