2008 references to EmitToImageReference
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
SymbolKey\SymbolKeyErrorTypeTests.cs (1)
388
.AddReferences(sourceCompilation.
EmitToImageReference
());
SymbolKey\SymbolKeyMetadataVsSourceTests.cs (2)
148
var comp2 = CreateCompilation(src2, [comp1.
EmitToImageReference
()]);
237
var comp40 = (Compilation)CreateCompilation(src2, [comp20.
EmitToImageReference
()]);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (230)
BreakingChanges.cs (1)
1581
var libRef = CreateCompilation(libSource, assemblyName: "lib").
EmitToImageReference
();
CodeGen\CodeGenAsyncIteratorTests.cs (2)
116
var lib_ref = lib.
EmitToImageReference
();
133
var lib_ref = lib.
EmitToImageReference
();
CodeGen\CodeGenAsyncLocalsTests.cs (1)
961
var reference = CreateCompilationWithMscorlib461(source, references: new MetadataReference[] { SystemRef_v4_0_30319_17929 }).
EmitToImageReference
();
CodeGen\CodeGenAsyncTests.cs (2)
3707
var rB = cB.
EmitToImageReference
();
3718
var rT = cT.
EmitToImageReference
();
CodeGen\CodeGenAwaitForeachTests.cs (2)
102
var comp = CreateCompilationWithTasksExtensions(source, references: new[] { lib.
EmitToImageReference
() });
3588
var comp = CreateCompilationWithTasksExtensions(source, references: new[] { lib.
EmitToImageReference
() });
CodeGen\CodeGenAwaitUsingTests.cs (2)
842
var comp = CreateCompilationWithTasksExtensions(comp_cs, references: new[] { libComp.
EmitToImageReference
() }, options: TestOptions.DebugExe);
879
var comp = CreateCompilationWithTasksExtensions(comp_cs, references: new[] { libComp.
EmitToImageReference
() }, options: TestOptions.DebugExe);
CodeGen\CodeGenDeconstructTests.cs (2)
8447
var lib = CreateCompilationWithMscorlib461(lib_cs, references: new[] { missing.
EmitToImageReference
() }, options: TestOptions.DebugDll);
8461
var comp = CreateCompilationWithMscorlib461(source, references: new[] { lib.
EmitToImageReference
() }, options: TestOptions.DebugDll); // no ValueTuple reference
CodeGen\CodeGenDynamicTests.cs (9)
144
return CreateCompilationWithMscorlib40(source, new[] { systemCore ?? SystemCoreRef }, assemblyName: GetUniqueName()).
EmitToImageReference
();
277
var systemCoreRef = CreateCompilationWithMscorlib40(SystemCoreSource, assemblyName: GetUniqueName()).
EmitToImageReference
();
296
var systemCoreRef = CreateCompilationWithMscorlib40(SystemCoreSource, assemblyName: GetUniqueName()).
EmitToImageReference
();
317
var systemCoreRef = CreateCompilationWithMscorlib40(SystemCoreSource, assemblyName: GetUniqueName()).
EmitToImageReference
();
456
var systemCoreRef = CreateCompilationWithMscorlib40(systemCoreSource, assemblyName: GetUniqueName()).
EmitToImageReference
();
485
var systemCoreRef = CreateCompilationWithMscorlib40(systemCoreSource, assemblyName: GetUniqueName()).
EmitToImageReference
();
11468
var vbRef = vb.
EmitToImageReference
();
11570
var vbRef = vb.
EmitToImageReference
();
11679
var vbRef = vb.
EmitToImageReference
();
CodeGen\CodeGenExplicitImplementationTests.cs (1)
128
references: new[] { comp1.
EmitToImageReference
() },
CodeGen\CodeGenExprLambdaTests.cs (2)
6020
var reference1 = compilation1.
EmitToImageReference
();
6067
var reference1 = compilation1.
EmitToImageReference
();
CodeGen\CodeGenFunctionPointersTests.cs (17)
2526
var nopiaReference = CreateCompilation(NoPiaInterfaces).
EmitToImageReference
(embedInteropTypes: true);
2559
var nopiaReference = CreateCompilation(NoPiaInterfaces).
EmitToImageReference
(embedInteropTypes: true);
2586
var nopiaReference = CreateCompilation(NoPiaInterfaces).
EmitToImageReference
(embedInteropTypes: true);
2593
}", references: new[] { nopiaReference }, parseOptions: TestOptions.RegularPreview, options: TestOptions.UnsafeReleaseDll).
EmitToImageReference
();
2622
internal class A {}", assemblyName: "A").
EmitToImageReference
();
2630
}", references: new[] { aRef }, assemblyName: "B", parseOptions: TestOptions.RegularPreview, options: TestOptions.UnsafeReleaseDll).
EmitToImageReference
();
2652
public class A {}", assemblyName: "A").
EmitToImageReference
();
2660
}", references: new[] { aRef }, assemblyName: "B", parseOptions: TestOptions.RegularPreview, options: TestOptions.UnsafeReleaseDll).
EmitToImageReference
();
6280
var metadataRef = baseComp.
EmitToImageReference
();
7583
var comp1 = CreateEmptyCompilation(source2, references: new[] { coreLib.
EmitToImageReference
() }, parseOptions: TestOptions.RegularPreview.WithNoRefSafetyRulesAttribute(), options: TestOptions.UnsafeReleaseDll);
7652
var comp1 = CreateEmptyCompilation(source2, references: new[] { coreLib.
EmitToImageReference
() }, parseOptions: TestOptions.RegularPreview.WithNoRefSafetyRulesAttribute(), options: TestOptions.UnsafeReleaseDll);
7737
var comp2 = CreateCompilationWithFunctionPointers(source2, new[] { reference.
EmitToImageReference
() });
8667
validate(comp0.
EmitToImageReference
());
10220
var usageComp = CreateCompilationWithFunctionPointers(usage, new[] { definitionComp.
EmitToImageReference
() });
10274
var usageComp = CreateCompilationWithFunctionPointers(usage, new[] { definitionComp.
EmitToImageReference
() });
10327
var differentComp = CreateCompilationWithFunctionPointers(source2, new[] { refComp.
EmitToImageReference
() });
10392
var differentComp = CreateCompilationWithFunctionPointers(source2, new[] { refComp.
EmitToImageReference
() });
CodeGen\CodeGenInParametersTests.cs (11)
2797
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "9");
2828
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "9");
2859
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "9");
2889
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "False");
2919
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "3");
4803
var libUser = CreateCompilation(libUser_cs, references: new[] { libOrig.
EmitToImageReference
() });
4828
var comp = CreateCompilation(src, references: new[] { libChanged.
EmitToImageReference
(), libUser.
EmitToImageReference
() });
4869
var libUser = CreateCompilation(libUser_cs, references: new[] { libOrig.
EmitToImageReference
() });
4908
var comp = CreateCompilation(src, references: new[] { libChanged.
EmitToImageReference
(), libUser.
EmitToImageReference
() });
CodeGen\CodeGenInterfaceImplementation.cs (1)
365
references: new[] { asmRef, comp1.
EmitToImageReference
() },
CodeGen\CodeGenNullCoalescingAssignmentTests.cs (2)
2669
var aRef = CreateCompilation(aSource).
EmitToImageReference
();
2671
var bRef = CreateCompilation(bSource, new[] { aRef }).
EmitToImageReference
();
CodeGen\CodeGenOverridingAndHiding.cs (3)
2658
new[] { referencedCompilation.
EmitToImageReference
() },
2763
new[] { referencedCompilation.
EmitToImageReference
() },
3482
references: new[] { asmfile, comp1.
EmitToImageReference
() },
CodeGen\CodeGenReadonlyStructTests.cs (7)
108
var ref1 = comp1.
EmitToImageReference
();
326
var ref1 = comp1.
EmitToImageReference
();
909
var clientComp = CreateCompilation("", references: new[] { comp.
EmitToImageReference
() });
996
var ref1 = comp1.
EmitToImageReference
();
1561
var comp = CreateCompilation("", references: new[] { externalComp.
EmitToImageReference
() });
1831
var image = CreateCompilation(external).
EmitToImageReference
();
1907
var image = CreateCompilation(external).
EmitToImageReference
();
CodeGen\CodeGenTests.cs (1)
13516
comp = CreateCompilation(code, references: new[] { reference.
EmitToImageReference
() });
CodeGen\CodeGenTupleTest.cs (66)
357
references: new[] { comp1.
EmitToImageReference
() });
412
references: new[] { SystemRuntimeFacadeRef, ValueTupleRef, comp1.
EmitToImageReference
() });
572
}", references: new[] { comp.
EmitToImageReference
() },
753
}", references: new[] { comp.
EmitToImageReference
() },
1696
var comp3 = CreateCompilationWithMscorlib40(source2, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef, compLib.
EmitToImageReference
() },
5938
var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.
EmitToImageReference
() });
13001
var comp = CreateCompilationWithMscorlib40(source, references: new[] { libComp.
EmitToImageReference
() });
13922
var comp4 = CreateCompilationWithMscorlib40(source1, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef, comp2.
EmitToImageReference
() },
14087
var comp4 = CreateCompilationWithMscorlib40(source1, references: (new[] { comp2.
EmitToImageReference
() }).Concat(s_valueTupleRefs),
14775
var consumer2 = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseExe, references: new[] { lib.
EmitToImageReference
() });
15036
var consumer2 = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseExe, references: new[] { lib.
EmitToImageReference
() });
15422
var consumer2 = CreateCompilationWithMscorlib46(source, options: TestOptions.ReleaseExe, references: new[] { lib.
EmitToImageReference
() });
15683
var consumer2 = CreateCompilationWithMscorlib46(source, options: TestOptions.ReleaseExe, references: new[] { lib.
EmitToImageReference
() });
16770
var comp2 = CreateCompilation(source, references: new[] { libComp.
EmitToImageReference
() });
19776
var comp4 = CreateCompilationWithMscorlib461(source2, references: new[] { comp2.
EmitToImageReference
() });
22810
var comp = CreateCompilationWithMscorlib40(source, assemblyName: "comp", references: new[] { libComp.
EmitToImageReference
() }, options: TestOptions.DebugExe);
23174
var ref0 = comp0.
EmitToImageReference
();
23192
var ref1 = comp1.
EmitToImageReference
();
23222
var ref0v1 = comp0v1.
EmitToImageReference
();
23230
var ref0v2 = comp0v2.
EmitToImageReference
();
23237
var ref1 = comp1.
EmitToImageReference
();
23248
var ref2 = comp2.
EmitToImageReference
();
25318
var corlibWithoutVTRef = corlibWithoutVT.
EmitToImageReference
();
25322
var corlibWithVTRef = corlibWithVT.
EmitToImageReference
();
25326
var libWithVTRef = libWithVT.
EmitToImageReference
();
25344
var libWithVTRef2 = CreateEmptyCompilation(valuetuple_cs, references: new[] { corlibWithoutVTRef }, parseOptions: parseOptions).
EmitToImageReference
();
26422
var libRef = useImageReference ? lib.
EmitToImageReference
() : lib.ToMetadataReference();
26446
references: new[] { comp.
EmitToImageReference
(), libRef, SystemRuntimeFacadeRef, ValueTupleRef },
26466
var missingContainerRef = useImageReference ? missingContainer.
EmitToImageReference
() : missingContainer.ToMetadataReference();
26484
var libRef = useImageReference ? lib.
EmitToImageReference
() : lib.ToMetadataReference();
26511
references: new[] { comp.
EmitToImageReference
(), libRef, SystemRuntimeFacadeRef, ValueTupleRef, missingContainerRef },
26529
var missingContainerRef = useImageReference ? missingContainer.
EmitToImageReference
() : missingContainer.ToMetadataReference();
26543
var libRef = useImageReference ? lib.
EmitToImageReference
() : lib.ToMetadataReference();
26568
references: new[] { comp.
EmitToImageReference
(), libRef, missingContainerRef, SystemRuntimeFacadeRef, ValueTupleRef },
26576
references: new[] { comp.
EmitToImageReference
(), libRef, missingContainerRef, SystemRuntimeFacadeRef, ValueTupleRef },
26590
var missingRef = useImageReference ? missing.
EmitToImageReference
() : missing.ToMetadataReference();
26608
var libRef = useImageReference ? lib.
EmitToImageReference
() : lib.ToMetadataReference();
26631
var executeComp = CreateCompilation(executable_cs, references: new[] { comp.
EmitToImageReference
(), libRef, missingRef }, options: TestOptions.DebugExe);
26642
var refA = comp.
EmitToImageReference
();
26647
var refB = comp.
EmitToImageReference
();
26681
var lib = CreateEmptyCompilation(lib_cs, references: new[] { MscorlibRef, vtLib.
EmitToImageReference
() });
26692
var comp = CreateEmptyCompilation(client_cs, references: new[] { MscorlibRef, lib.
EmitToImageReference
() }); // missing reference to vt
26701
var compWithFakeVt = CreateEmptyCompilation(client_cs, references: new[] { MscorlibRef, lib.
EmitToImageReference
(), fakeVtLib.
EmitToImageReference
() }); // reference to fake vt
26716
var comp2 = CreateEmptyCompilation(client2_cs, references: new[] { MscorlibRef, lib.
EmitToImageReference
() }); // missing reference to vt
26727
var comp2WithFakeVt = CreateEmptyCompilation(client2_cs, references: new[] { MscorlibRef, lib.
EmitToImageReference
(), fakeVtLib.
EmitToImageReference
() }); // reference to fake vt
26783
var lib = CreateEmptyCompilation(lib_cs, references: new[] { MscorlibRef, vtLib.
EmitToImageReference
() });
26798
var comp = CreateEmptyCompilation(client2_cs, references: new[] { MscorlibRef, lib.
EmitToImageReference
() }); // missing reference to vt
26809
var compWithFakeVt = CreateEmptyCompilation(client2_cs, references: new[] { MscorlibRef, lib.
EmitToImageReference
(), fakeVtLib.
EmitToImageReference
() }); // reference to fake vt
26847
var lib = CreateEmptyCompilation(lib_cs + tuplelib_cs + tupleattributes_cs, references: new[] { MscorlibRef, containerLib.
EmitToImageReference
() });
26858
var comp = CreateEmptyCompilation(client_cs, references: new[] { MscorlibRef, lib.
EmitToImageReference
() }); // missing reference to container
26867
var compWithFakeContainer = CreateEmptyCompilation(client_cs, references: new[] { MscorlibRef, lib.
EmitToImageReference
(), fakeContainerLib.
EmitToImageReference
() }); // reference to fake container
26922
var lib = CreateEmptyCompilation(lib_cs + tuplelib_cs + tupleattributes_cs, references: new[] { MscorlibRef, containerLib.
EmitToImageReference
() });
26933
var comp = CreateEmptyCompilation(client_cs, references: new[] { MscorlibRef, lib.
EmitToImageReference
() }); // missing reference to container
26942
var compWithFakeContainer = CreateEmptyCompilation(client_cs, references: new[] { MscorlibRef, lib.
EmitToImageReference
(), fakeContainerLib.
EmitToImageReference
() }); // reference to fake container
27044
var comp1ImageRef = new[] { comp1.
EmitToImageReference
() };
27128
var comp1ImageRef = new[] { comp1.
EmitToImageReference
() };
27202
var comp1ImageRef = new[] { comp1.
EmitToImageReference
() };
27280
var comp1ImageRef = new[] { comp1.
EmitToImageReference
() };
27543
var comp2 = CreateCompilation(source1, references: new[] { comp1.
EmitToImageReference
() }, options: TestOptions.DebugDll);
27970
var comp2 = CreateCompilation(client, references: new[] { comp.
EmitToImageReference
() }, targetFramework: TargetFramework.Mscorlib40);
28059
var comp2 = CreateCompilation(client, references: new[] { comp.
EmitToImageReference
() }, targetFramework: TargetFramework.Mscorlib40);
CodeGen\SwitchTests.cs (1)
3039
var reference = compVerifier.Compilation.
EmitToImageReference
();
CodeGen\UnsafeTests.cs (2)
5424
var lib = CreateCompilationWithMscorlib461(lib_cs, references: new[] { missing.
EmitToImageReference
() }, options: TestOptions.DebugDll);
5439
var comp = CreateCompilationWithMscorlib461(source, references: new[] { lib.
EmitToImageReference
() }, options: TestOptions.UnsafeDebugDll);
CodeGen\WinMdDelegateTests.cs (2)
146
assemblyName: "WinRTDelegateLibrary").
EmitToImageReference
();
154
assemblyName: "NonWinRTDelegateLibrary").
EmitToImageReference
();
Emit\BinaryCompatibility.cs (3)
34
var lib0Image = CreateCompilationWithMscorlib46(lib0, options: TestOptions.ReleaseDll, assemblyName: "lib").
EmitToImageReference
();
46
var lib1Image = CreateCompilationWithMscorlib46(lib1, options: TestOptions.ReleaseDll, assemblyName: "lib").
EmitToImageReference
();
58
var clientImage = CreateCompilationWithMscorlib46(client, references: new[] { lib0Image }, options: TestOptions.ReleaseDll).
EmitToImageReference
();
Emit\CompilationEmitTests.cs (33)
1033
var piaImageReference = pia.
EmitToImageReference
(embedInteropTypes: true);
1112
var piaImageReference = pia.
EmitToImageReference
(embedInteropTypes: true);
1808
var image1 = comp1.
EmitToImageReference
(EmitOptions.Default);
1816
var image2 = comp2.
EmitToImageReference
(EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(false));
1890
var libImage = libComp.
EmitToImageReference
(emitOptions);
2131
var realImage = comp.
EmitToImageReference
(EmitOptions.Default);
2162
var realImage2 = comp.
EmitToImageReference
(emitRegularWithoutPrivateMembers);
2190
var metadataImage = comp.
EmitToImageReference
(emitMetadataOnly);
2219
var refImage = comp.
EmitToImageReference
(emitRefOnly);
2268
var realImage = comp.
EmitToImageReference
(EmitOptions.Default);
2278
var metadataImage = comp.
EmitToImageReference
(emitMetadataOnly);
2290
var refImage = comp.
EmitToImageReference
(emitRefOnly);
2335
var realImage = comp.
EmitToImageReference
(EmitOptions.Default);
2345
var metadataImage = comp.
EmitToImageReference
(emitMetadataOnly);
2357
var refImage = comp.
EmitToImageReference
(emitRefOnly);
2402
var realImage = comp.
EmitToImageReference
(EmitOptions.Default);
2412
var metadataImage = comp.
EmitToImageReference
(emitMetadataOnly);
2424
var refImage = comp.
EmitToImageReference
(emitRefOnly);
2463
var refImage = comp.
EmitToImageReference
(emitRefOnly);
2508
var refImage = comp.
EmitToImageReference
(emitRefOnly);
4682
var imageRef = refCompilation.
EmitToImageReference
();
4766
var imageRef = refCompilation.
EmitToImageReference
();
4812
var imageRef = refCompilation.
EmitToImageReference
();
4867
var imageRef = refCompilation.
EmitToImageReference
();
4899
var imageRef = refCompilation.
EmitToImageReference
();
4946
var imageRef = refCompilation.
EmitToImageReference
();
4976
var imageRef = refCompilation.
EmitToImageReference
();
5024
var imageRef = refCompilation.
EmitToImageReference
();
5264
var ref1 = comp1.
EmitToImageReference
();
5268
var ref2 = comp2.
EmitToImageReference
();
5311
var ref1 = comp1.
EmitToImageReference
();
5315
var ref2 = comp2.
EmitToImageReference
();
5549
var modRef = CreateCompilation("public class A { }", options: TestOptions.ReleaseModule, assemblyName: "refMod").
EmitToImageReference
();
Emit\CovariantReturnTests.cs (7)
231
return compilation.
EmitToImageReference
(options: new CodeAnalysis.Emit.EmitOptions(runtimeMetadataVersion: "v5.1"));
337
var csharpReference = csharpCompilation.
EmitToImageReference
();
393
var csharpReference = csharpCompilation.
EmitToImageReference
();
497
assemblyName: "ref0").VerifyEmitDiagnostics().
EmitToImageReference
();
507
assemblyName: "ref1").VerifyEmitDiagnostics().
EmitToImageReference
();
518
assemblyName: "ref1").VerifyEmitDiagnostics().
EmitToImageReference
();
529
assemblyName: "ref2").VerifyEmitDiagnostics().
EmitToImageReference
();
Emit\EmitMetadataTests.cs (3)
2715
references: new[] { comAssembly.
EmitToImageReference
(embedInteropTypes: true) },
2870
references: new[] { reference.
EmitToImageReference
() },
2922
references: new[] { reference.
EmitToImageReference
() },
Emit\EntryPointTests.cs (1)
1576
new MetadataReference[] { netModule.
EmitToImageReference
() },
Emit\InAttributeModifierTests.cs (46)
45
verifier = CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5");
79
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5");
103
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5");
130
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5");
154
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5");
180
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5");
207
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5");
2533
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
2580
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
2635
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
2683
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
2730
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
2775
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
2820
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
2865
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
2910
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
2955
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
3000
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
3046
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
3092
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
3138
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
3184
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
3232
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
3280
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
3335
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
3383
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
3431
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
3477
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
3523
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
3569
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
3615
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
3661
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5", symbolValidator: validator);
3694
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5");
3727
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5");
3770
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5");
3812
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5");
4201
CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.
EmitToImageReference
() }, options: TestOptions.ReleaseExe, symbolValidator: validator);
4248
CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.
EmitToImageReference
() }, options: TestOptions.ReleaseExe, symbolValidator: validator);
4297
CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.
EmitToImageReference
() }, options: TestOptions.ReleaseExe, symbolValidator: validator);
4349
CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.
EmitToImageReference
() }, options: TestOptions.ReleaseExe, symbolValidator: validator);
4402
CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.
EmitToImageReference
() }, options: TestOptions.ReleaseExe, symbolValidator: validator);
4414
var ref1 = CreateCompilation(refCode).
EmitToImageReference
();
4415
var ref2 = CreateCompilation(refCode).
EmitToImageReference
();
4457
var corlibWithoutInAttributeRef = CreateEmptyCompilation(corlib_cs).
EmitToImageReference
();
4465
var ref1 = CreateEmptyCompilation(refCode, references: new[] { corlibWithoutInAttributeRef }).
EmitToImageReference
();
4466
var ref2 = CreateEmptyCompilation(refCode, references: new[] { corlibWithoutInAttributeRef }).
EmitToImageReference
();
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (73)
CodeGen\CodeGenSpanBasedStringConcatTests.cs (9)
639
var corlib = CreateEmptyCompilation(corlib_cs).
EmitToImageReference
();
714
var corlib = CreateEmptyCompilation(corlib_cs).
EmitToImageReference
();
788
var corlib = CreateEmptyCompilation(corlib_cs).
EmitToImageReference
();
2180
var corlib = CreateEmptyCompilation(corlib_cs).
EmitToImageReference
();
2258
var corlib = CreateEmptyCompilation(corlib_cs).
EmitToImageReference
();
2335
var corlib = CreateEmptyCompilation(corlib_cs).
EmitToImageReference
();
4833
var corlib = CreateEmptyCompilation(corlib_cs).
EmitToImageReference
();
4914
var corlib = CreateEmptyCompilation(corlib_cs).
EmitToImageReference
();
4994
var corlib = CreateEmptyCompilation(corlib_cs).
EmitToImageReference
();
Emit\EditAndContinue\AssemblyReferencesTests.cs (3)
398
var compilation0 = CreateEmptyCompilation(src0, new[] { MscorlibRef, lib0.
EmitToImageReference
() }, assemblyName: "C", options: TestOptions.DebugDll);
399
var compilation1 = compilation0.WithSource(src1).WithReferences(new[] { MscorlibRef, lib1.
EmitToImageReference
() });
400
var compilation2 = compilation1.WithSource(src2).WithReferences(new[] { MscorlibRef, lib2.
EmitToImageReference
() });
Emit\EditAndContinue\SymbolMatcherTests.cs (7)
31
var reference = compilation.
EmitToImageReference
();
547
var peRef0 = compilation0.
EmitToImageReference
();
945
var peRef0 = compilation0.
EmitToImageReference
();
1102
var peRef0 = compilation0.
EmitToImageReference
();
1523
var peRef0 = compilation0.
EmitToImageReference
();
1583
var peRef0 = compilation0.
EmitToImageReference
();
1653
var peRef0 = compilation0.
EmitToImageReference
();
Emit\NumericIntPtrTests.cs (10)
939
var ref2 = comp.
EmitToImageReference
();
1001
var ref2 = comp.
EmitToImageReference
();
1194
var ref2 = comp.
EmitToImageReference
();
2812
var ref0 = comp.
EmitToImageReference
();
2842
var ref0 = comp.
EmitToImageReference
();
3057
var ref2 = comp.
EmitToImageReference
();
9031
var refA = comp.
EmitToImageReference
();
10336
comp = CreateEmptyCompilation(source, references: new[] { corlib.
EmitToImageReference
() }, parseOptions: parseOptions);
10722
var image = comp.
EmitToImageReference
();
11153
var comp = CreateEmptyCompilation(source, references: new[] { corlib.
EmitToImageReference
() });
Emit\UnmanagedTypeModifierTests.cs (26)
660
}", references: new[] { reference.Compilation.
EmitToImageReference
() }, expectedOutput: @"
685
}", references: new[] { parent.Compilation.
EmitToImageReference
() }, symbolValidator: module =>
702
}", references: new[] { parent.Compilation.
EmitToImageReference
(), child.Compilation.
EmitToImageReference
() }, expectedOutput: @"
740
}", references: new[] { reference.Compilation.
EmitToImageReference
() }, expectedOutput: "Child");
763
}", references: new[] { parent.Compilation.
EmitToImageReference
() }, symbolValidator: module =>
779
}", references: new[] { parent.Compilation.
EmitToImageReference
(), child.Compilation.
EmitToImageReference
() }, expectedOutput: "Child");
815
}", references: new[] { reference.Compilation.
EmitToImageReference
() }, expectedOutput: "Child");
838
}", references: new[] { parent.Compilation.
EmitToImageReference
() }, symbolValidator: module =>
854
}", references: new[] { parent.Compilation.
EmitToImageReference
(), child.Compilation.
EmitToImageReference
() }, expectedOutput: "Child");
890
}", references: new[] { reference.Compilation.
EmitToImageReference
() }, expectedOutput: "Child");
913
}", references: new[] { parent.Compilation.
EmitToImageReference
() }, symbolValidator: module =>
929
}", references: new[] { parent.Compilation.
EmitToImageReference
(), child.Compilation.
EmitToImageReference
() }, expectedOutput: "Child");
966
}", references: new[] { reference.Compilation.
EmitToImageReference
() }, expectedOutput: "Child");
989
}", references: new[] { parent.Compilation.
EmitToImageReference
() }, symbolValidator: module =>
1006
}", references: new[] { parent.Compilation.
EmitToImageReference
(), child.Compilation.
EmitToImageReference
() }, expectedOutput: "Child");
1086
references: new[] { reference.Compilation.
EmitToImageReference
() },
1108
var ref1 = CreateCompilation(refCode).
EmitToImageReference
();
1109
var ref2 = CreateCompilation(refCode).
EmitToImageReference
();
1143
var corlibWithoutUnmanagedTypeRef = CreateEmptyCompilation(corlib_cs).
EmitToImageReference
();
1151
var ref1 = CreateEmptyCompilation(refCode, references: new[] { corlibWithoutUnmanagedTypeRef }).
EmitToImageReference
();
1152
var ref2 = CreateEmptyCompilation(refCode, references: new[] { corlibWithoutUnmanagedTypeRef }).
EmitToImageReference
();
PDB\PDBUsingTests.cs (18)
808
var refA = comp.
EmitToImageReference
(aliases: ImmutableArray.Create("A2"));
858
var refA1 = comp.
EmitToImageReference
(aliases: ImmutableArray.Create("A2"));
868
var refA4 = comp.
EmitToImageReference
(aliases: ImmutableArray.Create("A5"));
944
var refA1 = comp.
EmitToImageReference
(aliases: ImmutableArray.Create("A2"));
954
var refA4 = comp.
EmitToImageReference
(aliases: ImmutableArray.Create("A5"));
1030
var refA1 = comp.
EmitToImageReference
(aliases: ImmutableArray.Create("A2", "A3"));
1040
var refA4 = comp.
EmitToImageReference
(aliases: ImmutableArray.Create("A5"));
1123
var refA1 = comp.
EmitToImageReference
(aliases: ImmutableArray.Create("A2", "A3"));
1133
var refA4 = comp.
EmitToImageReference
(aliases: ImmutableArray.Create("A5"));
1216
var refA1 = comp.
EmitToImageReference
(aliases: ImmutableArray.Create("A2"));
1226
var refA4 = comp.
EmitToImageReference
(aliases: ImmutableArray.Create("A5"));
1308
var refA1 = comp.
EmitToImageReference
(aliases: ImmutableArray.Create("A2"));
1318
var refA4 = comp.
EmitToImageReference
(aliases: ImmutableArray.Create("A5"));
2599
var libRef = CreateCompilation(libSource, assemblyName: "Lib").
EmitToImageReference
();
2694
var libRef = lib.
EmitToImageReference
(aliases: ImmutableArray.Create("Q"));
3153
var libRef = CreateCompilation(sourceLib, assemblyName: "ImportedNoPiaTypesAssemblyName").
EmitToImageReference
(embedInteropTypes: true);
3225
var libRef1 = CreateCompilation(sourceLib1).
EmitToImageReference
();
3226
var libRef2 = CreateCompilation(sourceLib2, new[] { libRef1 }, assemblyName: "LibRef2").
EmitToImageReference
();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (405)
Attributes\AttributeTests.cs (41)
116
var compWithReferenceToLib = CreateCompilation(reference_cs, references: new[] { origLibComp.
EmitToImageReference
() });
119
var newLibComp = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.
EmitToImageReference
() }, assemblyName: "lib");
149
var compWithReferenceToLib = CreateCompilation(reference_cs, references: new[] { origLibComp.
EmitToImageReference
() });
152
var newLibComp = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.
EmitToImageReference
() }, assemblyName: "lib");
189
var compWithReferenceToLib = CreateCompilation(reference_cs, references: new[] { origLibComp.
EmitToImageReference
() });
192
var newLibComp = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.
EmitToImageReference
() }, assemblyName: "lib");
238
var compWithReferenceToLib = CreateCompilation(reference_cs, references: new[] { origLibComp.
EmitToImageReference
() });
241
var newLibComp = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.
EmitToImageReference
() }, assemblyName: "lib");
274
var compWithReferenceToLib = CreateCompilation(reference_cs, references: new[] { origLibComp.
EmitToImageReference
() });
278
references: new[] { compWithReferenceToLib.
EmitToImageReference
(), newComp.
EmitToImageReference
() }, assemblyName: "lib");
311
var compWithReferenceToLib = CreateCompilation(reference_cs, references: new[] { origLibComp.
EmitToImageReference
() });
314
var newLibComp = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.
EmitToImageReference
(), newComp.
EmitToImageReference
() }, assemblyName: "lib");
320
var newLibComp3 = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.
EmitToImageReference
(), newComp.
EmitToImageReference
() }, assemblyName: "lib");
342
var compWithDerivedAndReferenceToLib = CreateCompilation(typeForward_cs + derivedDefinition_cs, references: new[] { origLibComp.
EmitToImageReference
() });
348
var newLibComp = CreateCompilation(typeForward_cs, references: new[] { compWithDerivedAndReferenceToLib.
EmitToImageReference
(), compWithC.
EmitToImageReference
() }, assemblyName: "lib");
384
var compWithReferenceToLib = CreateCompilation(reference_cs, references: new[] { origLibComp.
EmitToImageReference
() });
388
references: new[] { compWithReferenceToLib.
EmitToImageReference
(), newComp.
EmitToImageReference
() }, assemblyName: "lib");
422
var compWithReferenceToLib = CreateCompilation(reference_cs, references: new[] { origLibComp.
EmitToImageReference
() });
425
var newLibComp = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.
EmitToImageReference
(), newComp.
EmitToImageReference
() }, assemblyName: "lib");
457
var compWithReferenceToLib = CreateCompilation(reference_cs, references: new[] { origLibComp.
EmitToImageReference
() });
460
var newLibComp = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.
EmitToImageReference
(), newComp.
EmitToImageReference
() }, assemblyName: "lib");
997
CreateCompilation(usageSource, references: new[] { definitionComp.
EmitToImageReference
() }, options: WithNullableEnable())
5707
var r1 = c1.
EmitToImageReference
();
5710
var r2 = c2.
EmitToImageReference
();
8555
var ref1 = comp.
EmitToImageReference
();
8594
var ref1 = comp.
EmitToImageReference
();
9918
var comp2 = CreateCompilation("", new[] { comp.
EmitToImageReference
() });
10236
var libRef = CreateCompilation(lib_cs, parseOptions: TestOptions.RegularPreview).
EmitToImageReference
();
10286
var libRef = CreateCompilation(lib_cs, parseOptions: TestOptions.RegularPreview).
EmitToImageReference
();
10312
var libRef = CreateCompilation(lib_cs, parseOptions: TestOptions.RegularPreview).
EmitToImageReference
();
10338
var libRef = CreateCompilation(lib_cs, parseOptions: TestOptions.RegularPreview).
EmitToImageReference
();
10469
comp2 = CreateCompilation(source2, references: new[] { comp1.
EmitToImageReference
() }, parseOptions: TestOptions.Regular9);
10540
comp2 = CreateCompilation(source2, references: new[] { comp1.
EmitToImageReference
() }, parseOptions: TestOptions.Regular9);
11063
var comp2 = CreateVisualBasicCompilation(vbSource, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Standard).Concat(comp.
EmitToImageReference
()));
Attributes\AttributeTests_Assembly.cs (32)
422
compilation = CreateCompilationWithMscorlib40("", new MetadataReference[] { compilation.
EmitToImageReference
() }, TestOptions.ReleaseDll, assemblyName: assemblyNameBase + "20");
451
compilation = CreateCompilationWithMscorlib40("", new MetadataReference[] { compilation.
EmitToImageReference
() }, TestOptions.ReleaseDll, assemblyName: assemblyNameBase + "25");
470
compilation = CreateCompilationWithMscorlib40("", new MetadataReference[] { compilation.
EmitToImageReference
() }, TestOptions.ReleaseDll, assemblyName: assemblyNameBase + "40");
505
compilation = CreateCompilationWithMscorlib40("", new MetadataReference[] { compilation.
EmitToImageReference
() }, TestOptions.ReleaseDll, assemblyName: assemblyNameBase + "60");
815
", options: TestOptions.ReleaseDll, references: new[] { hash_module_Comp.
EmitToImageReference
() });
1434
var netmodule2Ref = compilation.
EmitToImageReference
();
1841
var assembly = CreateCompilation(assemblySrc, new[] { module.
EmitToImageReference
() }, assemblyName: "C");
1946
var assembly = CreateCompilation(assemblySrc, new[] { module.
EmitToImageReference
() }, assemblyName: "C");
1971
var assembly = CreateCompilation(assemblySrc, new[] { module1.
EmitToImageReference
(), module2.
EmitToImageReference
() }, assemblyName: "C");
1996
var assembly = CreateCompilation(assemblySrc, new[] { module1.
EmitToImageReference
() }, assemblyName: "C");
2024
var assembly = CreateCompilation(assemblySrc, new[] { module1.
EmitToImageReference
(), module2.
EmitToImageReference
() }, assemblyName: "C");
2049
var assembly = CreateCompilation(assemblySrc, new[] { module1.
EmitToImageReference
() }, assemblyName: "C");
2077
var assembly = CreateCompilation(assemblySrc, new[] { module1.
EmitToImageReference
(), module2.
EmitToImageReference
() }, assemblyName: "C");
2100
var assembly = CreateCompilation(assemblySrc, new[] { module1.
EmitToImageReference
() }, assemblyName: "C");
2120
references: new MetadataReference[] { compMod1.
EmitToImageReference
(), compMod2.
EmitToImageReference
() },
2152
references: new MetadataReference[] { compMod1.
EmitToImageReference
(), compMod2.
EmitToImageReference
() },
2182
references: new MetadataReference[] { compMod1.
EmitToImageReference
(), compMod2.
EmitToImageReference
() },
2214
references: new MetadataReference[] { compMod1.
EmitToImageReference
(), compMod2.
EmitToImageReference
() },
2239
references: new MetadataReference[] { compMod1.
EmitToImageReference
() },
2286
var attributeDefinition1 = CreateCompilation(attribute1, options: TestOptions.ReleaseDll, assemblyName: "A1").
EmitToImageReference
();
2291
var moduleWithAttribute = CreateCompilation(module, references: new[] { attributeDefinition1 }, options: TestOptions.ReleaseModule, assemblyName: "M1").
EmitToImageReference
();
2318
var attributeDefinition2 = CreateCompilation(attribute2, options: TestOptions.ReleaseDll, assemblyName: "A1").
EmitToImageReference
();
2337
var c1Definition = CreateCompilation(c1, options: TestOptions.ReleaseDll, assemblyName: "A1").
EmitToImageReference
();
2347
var module1WithAttribute = CreateCompilation(module1, references: new[] { c1Definition }, options: TestOptions.ReleaseModule, assemblyName: "M1").
EmitToImageReference
();
2376
var module2WithAttribute = CreateCompilation(module2, references: new[] { c1Definition }, options: TestOptions.ReleaseModule, assemblyName: "M1").
EmitToImageReference
();
Attributes\AttributeTests_CallerInfoAttributes.cs (2)
681
var ref1 = comp1.
EmitToImageReference
();
1567
var ref1 = comp1.
EmitToImageReference
();
Attributes\AttributeTests_Dynamic.cs (2)
1191
var ref0 = comp.
EmitToImageReference
();
1228
var ref0 = comp.
EmitToImageReference
();
Attributes\AttributeTests_Embedded.cs (1)
505
var compilation2 = CreateCompilation("", references: new[] { compilation1.
EmitToImageReference
() });
Attributes\AttributeTests_Experimental.cs (2)
89
var comp2A = CreateCompilation(source2, new[] { comp1.
EmitToImageReference
() });
559
var comp2 = CreateCompilationWithMscorlib40AndSystemCore(source2, references: new[] { comp1.
EmitToImageReference
() });
Attributes\AttributeTests_IsByRefLike.cs (2)
611
var compilation_BinaryReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.
EmitToImageReference
(embedInteropTypes: true) });
914
CreateCompilation(text, new[] { libComp.
EmitToImageReference
() }).VerifyEmitDiagnostics(
Attributes\AttributeTests_IsUnmanaged.cs (8)
132
}").
EmitToImageReference
();
159
}").
EmitToImageReference
();
185
}").
EmitToImageReference
();
221
}").
EmitToImageReference
();
249
}").
EmitToImageReference
();
276
}").
EmitToImageReference
();
302
}").
EmitToImageReference
();
339
}").
EmitToImageReference
();
Attributes\AttributeTests_LifetimeAnnotation.cs (1)
56
var ref0 = comp.
EmitToImageReference
();
Attributes\AttributeTests_MarshalAs.cs (1)
1532
references: new[] { comp1.
EmitToImageReference
() }, // it has to be real assembly, Comp2comp reference OK
Attributes\AttributeTests_NativeInteger.cs (4)
63
var ref0 = comp.
EmitToImageReference
();
835
var ref1 = comp.
EmitToImageReference
();
845
var ref2 = comp.
EmitToImageReference
();
1386
var ref1 = comp.
EmitToImageReference
();
Attributes\AttributeTests_Nullable.cs (27)
43
Func<CSharpCompilation, MetadataReference> getReference = c => useImageReferences ? c.
EmitToImageReference
() : c.ToMetadataReference();
108
Func<CSharpCompilation, MetadataReference> getReference = c => useImageReferences ? c.
EmitToImageReference
() : c.ToMetadataReference();
206
Func<CSharpCompilation, MetadataReference> getReference = c => useImageReferences ? c.
EmitToImageReference
() : c.ToMetadataReference();
372
var ref0 = comp0.
EmitToImageReference
();
529
var refA = comp.
EmitToImageReference
();
564
var refA = comp.
EmitToImageReference
();
598
var ref0 = comp0.
EmitToImageReference
();
646
var ref0 = comp0.
EmitToImageReference
();
699
var ref0 = comp0.
EmitToImageReference
();
1103
var comp2 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), parseOptions: TestOptions.Regular8, references: new[] { comp.
EmitToImageReference
() });
1158
var comp2 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), parseOptions: TestOptions.Regular8, references: new[] { comp.
EmitToImageReference
() });
1208
var comp2 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), parseOptions: TestOptions.Regular8, references: new[] { comp.
EmitToImageReference
() });
1381
comp2 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), parseOptions: TestOptions.Regular8, references: new[] { comp.
EmitToImageReference
() });
1434
var comp2 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), parseOptions: TestOptions.Regular8, references: new[] { comp.
EmitToImageReference
() });
1489
comp2 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), parseOptions: TestOptions.Regular8, references: new[] { comp.
EmitToImageReference
() });
1546
comp2 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), parseOptions: TestOptions.Regular8, references: new[] { comp.
EmitToImageReference
() });
2240
var ref0 = comp0.
EmitToImageReference
();
2493
var ref0 = comp0.
EmitToImageReference
();
4145
var ref0 = comp.
EmitToImageReference
();
4162
var ref1 = comp.
EmitToImageReference
();
4250
var ref0 = comp.
EmitToImageReference
();
4294
var ref0 = comp.
EmitToImageReference
();
4348
var ref0 = comp.
EmitToImageReference
();
4394
var ref0 = comp0.
EmitToImageReference
();
4794
var comp2 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), parseOptions: TestOptions.Regular8, references: new[] { comp.
EmitToImageReference
() });
4924
var comp2 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), parseOptions: TestOptions.Regular8, references: new[] { comp.
EmitToImageReference
() });
5284
return comp.
EmitToImageReference
();
Attributes\AttributeTests_NullableContext.cs (4)
53
var ref0 = comp.
EmitToImageReference
();
168
var ref0 = comp.
EmitToImageReference
();
263
var ref0 = comp0.
EmitToImageReference
();
276
var ref1 = comp1.
EmitToImageReference
();
Attributes\AttributeTests_NullablePublicOnly.cs (3)
54
var ref1 = comp.
EmitToImageReference
();
239
var ref0 = comp.
EmitToImageReference
();
464
var ref0 = comp.
EmitToImageReference
();
Attributes\AttributeTests_ReadOnlyStruct.cs (1)
603
var compilation_BinaryReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.
EmitToImageReference
(embedInteropTypes: true) });
Attributes\AttributeTests_RefReadOnly.cs (3)
1330
var compilation_BinaryReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.
EmitToImageReference
(embedInteropTypes: true) });
1519
").
EmitToImageReference
();
2224
").
EmitToImageReference
();
Attributes\AttributeTests_RefSafetyRules.cs (2)
152
var refA = CreateCompilation(sourceA, parseOptions: TestOptions.Regular10).
EmitToImageReference
();
203
var refA = CreateCompilation(sourceA).
EmitToImageReference
();
Attributes\AttributeTests_Synthesized.cs (7)
123
var reference = CreateCompilation(source).
EmitToImageReference
();
145
var reference = CreateCompilation(source, options: TestOptions.UnsafeReleaseDll).
EmitToImageReference
();
1800
var reference = CreateCompilationWithMscorlib461(source, options: referenceOptions).
EmitToImageReference
(options: new EmitOptions(metadataOnly: true));
1899
var reference = CreateCompilationWithMscorlib461(source, options: referenceOptions).
EmitToImageReference
(options: new EmitOptions(metadataOnly: true));
1935
var mslibRef = mslibComp.
EmitToImageReference
();
1939
var mslibNoStringRef = mslibNoStringComp.
EmitToImageReference
();
1956
var diagLibRef = diagLibComp.
EmitToImageReference
();
Attributes\AttributeTests_Tuples.cs (2)
178
var ref0 = comp.
EmitToImageReference
();
216
var ref0 = comp.
EmitToImageReference
();
Attributes\AttributeTests_WellKnownAttributes.cs (28)
576
var libAssemblyRef = libComp.
EmitToImageReference
();
3849
CompileAndVerify(source2, references: new[] { compDll.
EmitToImageReference
() }, expectedOutput: expectedOutput);
3957
CompileAndVerify(source2, references: new[] { compDll.
EmitToImageReference
() }, expectedOutput: expectedOutput);
4032
CreateCompilation(source2, references: new[] { compDll.
EmitToImageReference
() }).VerifyDiagnostics(
4111
CreateCompilation(source2, references: new[] { compDll.
EmitToImageReference
() }).VerifyDiagnostics(
4274
CreateCompilation(source2, references: new[] { compDll.
EmitToImageReference
() }).VerifyDiagnostics(
4893
var client2 = CreateCompilation("", references: new[] { lib_comp.
EmitToImageReference
() });
4968
var comp = CreateCompilationWithMscorlib46(source, references: new[] { lib.
EmitToImageReference
() });
4970
var comp2 = CreateCompilationWithMscorlib46(errors, references: new[] { comp.
EmitToImageReference
() });
8602
verify(comp1.
EmitToImageReference
());
8657
verify(comp1.
EmitToImageReference
());
8701
verify(comp1.
EmitToImageReference
());
8744
verify(comp1.
EmitToImageReference
());
8843
verifyReference(comp1.
EmitToImageReference
(), options, expectedDiagnostics);
8896
verify(comp1.
EmitToImageReference
());
8944
verify(comp1.
EmitToImageReference
());
9023
verify(comp1.
EmitToImageReference
());
9078
verify(comp1.
EmitToImageReference
());
9127
verify(comp1.
EmitToImageReference
());
9178
verify(comp1.
EmitToImageReference
());
9507
verify(comp1.
EmitToImageReference
());
9650
var comp2 = CreateCompilation(source2, new[] { comp1.
EmitToImageReference
() });
9872
compilation2 = CreateEmptyCompilation(source2, WinRtRefs.Concat(new[] { compilation1.
EmitToImageReference
() }), TestOptions.ReleaseDll);
9907
references: WinRtRefs.Append(CreateEmptyCompilation(new[] { libSrc }, WinRtRefs, TestOptions.ReleaseDll).
EmitToImageReference
()).ToArray(),
9979
var compilation2 = CreateCompilationWithMscorlib40AndSystemCore(source2, new[] { compilation1.
EmitToImageReference
() });
10062
var compilation2 = CreateCompilationWithMscorlib40AndSystemCore(source2, new[] { compilation1.
EmitToImageReference
() });
12745
var comp = CompileAndVerify(source, references: new[] { metadata_comp.
EmitToImageReference
() });
13599
var refA = comp.
EmitToImageReference
();
Attributes\InternalsVisibleToAndStrongNameTests.cs (14)
988
var other = CreateCompilation(cs0281, references: new[] { friendClass.
EmitToImageReference
() }, assemblyName: "cs0281", options: TestOptions.SigningReleaseDll, parseOptions: parseOptions);
1032
var other = CreateCompilation(cs0281, references: new[] { friendClass.
EmitToImageReference
() }, assemblyName: "cs0281", options: TestOptions.SigningReleaseDll, parseOptions: parseOptions);
1482
references: new[] { comp.
EmitToImageReference
() },
1604
var reference = other.
EmitToImageReference
();
1628
var reference = other.
EmitToImageReference
();
1825
references: new[] { other.
EmitToImageReference
() },
1848
references: new[] { other.
EmitToImageReference
() },
2897
var libRef = CreateCompilation(lib_cs, options: TestOptions.SigningReleaseDll, parseOptions: parseOptions).
EmitToImageReference
();
2934
var libRef = CreateCompilation(lib_cs, options: TestOptions.SigningReleaseDll).
EmitToImageReference
();
2986
comp = CreateCompilation(source1, new[] { lib.
EmitToImageReference
() }, assemblyName: "Issue57742_01");
3021
comp = CreateCompilation(source1, new[] { lib.
EmitToImageReference
() }, assemblyName: "Issue57742_02");
3070
MetadataReference imageReference = lib.
EmitToImageReference
();
3194
MetadataReference imageReference = lib.
EmitToImageReference
();
3253
comp = CreateCompilation(source1, new[] { lib.
EmitToImageReference
() }, assemblyName: "Issue57742_05");
FieldKeywordTests.cs (1)
8296
var refA = comp.
EmitToImageReference
(
FirstClassSpanTests.cs (5)
1509
var comp1 = CreateCompilation(source1).VerifyDiagnostics().
EmitToImageReference
();
1957
.
EmitToImageReference
();
2056
.
EmitToImageReference
();
2294
.
EmitToImageReference
();
2527
.
EmitToImageReference
();
FlowAnalysis\RegionAnalysisTests.cs (1)
8047
var libraryReference = CreateCompilation(libSource).
EmitToImageReference
();
FlowAnalysis\StructTests.cs (3)
417
var moduleReference = comp1.
EmitToImageReference
();
460
var moduleReference = comp1.
EmitToImageReference
();
493
var moduleReference = comp1.
EmitToImageReference
();
OverloadResolutionPriorityTests.cs (4)
257
var derivedReference = useMetadataReference ? derivedComp.ToMetadataReference() : derivedComp.
EmitToImageReference
();
306
var derivedReference = useMetadataReference ? derivedComp.ToMetadataReference() : derivedComp.
EmitToImageReference
();
1788
var vbRef = vb.
EmitToImageReference
();
1796
var verifier = CompileAndVerify(executable, references: [attrRef.
EmitToImageReference
(), vbRef]).VerifyDiagnostics();
RefReadonlyParameterTests.cs (17)
1305
var comp1Ref = comp1.
EmitToImageReference
();
1330
var comp1bRef = comp1b.
EmitToImageReference
();
1372
var comp1v1Ref = comp1v1.
EmitToImageReference
();
1387
var comp2Ref = comp2.
EmitToImageReference
();
1413
var comp4Ref = comp4.
EmitToImageReference
();
1419
var comp1v2Ref = comp1v2.
EmitToImageReference
();
1433
var comp1v3Ref = comp1v3.
EmitToImageReference
();
1440
var comp1v4Ref = comp1v4.
EmitToImageReference
();
1467
var comp1Ref = comp1.
EmitToImageReference
();
4547
? CreateCompilation(source2, new[] { CreateCompilation(source1).VerifyDiagnostics(warning1).
EmitToImageReference
() }, options: TestOptions.ReleaseExe)
4598
? CreateCompilation(source2, new[] { CreateCompilation(source1).VerifyDiagnostics(warning1).
EmitToImageReference
() }, options: TestOptions.ReleaseExe)
4736
? CreateCompilation(source2, new[] { CreateCompilation(source1).VerifyDiagnostics(warnings1).
EmitToImageReference
() }, options: TestOptions.ReleaseExe)
4837
? CreateCompilation(source2, new[] { CreateCompilation(source1).VerifyDiagnostics(warning1).
EmitToImageReference
() }, options: TestOptions.ReleaseExe)
5251
var comp1Ref = comp1.
EmitToImageReference
();
6675
var comp1v1Ref = emit ? comp1v1.
EmitToImageReference
() : comp1v1.ToMetadataReference();
6684
var comp1v2Ref = emit ? comp1v2.
EmitToImageReference
() : comp1v2.ToMetadataReference();
6693
var comp2Ref = emit ? comp2.
EmitToImageReference
() : comp2.ToMetadataReference();
RefStructInterfacesTests.cs (6)
645
MetadataReference[] comp1Refs = [comp1.
EmitToImageReference
(), comp1.ToMetadataReference()];
949
MetadataReference[] comp1Refs = [comp1.
EmitToImageReference
(), comp1.ToMetadataReference()];
1063
MetadataReference[] comp1Refs = [comp1.
EmitToImageReference
(), comp1.ToMetadataReference()];
1544
MetadataReference[] comp1Refs = [comp1.
EmitToImageReference
(), comp1.ToMetadataReference()];
1639
MetadataReference[] comp1Refs = [comp1.
EmitToImageReference
(), comp1.ToMetadataReference()];
2120
MetadataReference[] comp1Refs = [comp1.
EmitToImageReference
(), comp1.ToMetadataReference()];
Semantics\CollectionExpressionTests.cs (12)
9238
var refA = comp.
EmitToImageReference
();
9260
var refB = comp.
EmitToImageReference
();
12251
var refA = comp.
EmitToImageReference
();
12263
var refB = comp.
EmitToImageReference
();
13769
var reference = CreateEmptyCompilation(runtime, assemblyName: "System.Runtime").VerifyDiagnostics().
EmitToImageReference
();
15655
var refA = comp.
EmitToImageReference
();
16444
var refA = comp.
EmitToImageReference
();
16458
var refB = comp.
EmitToImageReference
();
19924
var refA = comp.
EmitToImageReference
();
19939
var refB = comp.
EmitToImageReference
();
22628
var refA = comp.
EmitToImageReference
();
25724
var refA = comp.
EmitToImageReference
();
Semantics\ExperimentalAttributeTests.cs (72)
55
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
103
var comp = CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
130
var attrRef = attrComp.
EmitToImageReference
();
155
var attrRef = attrComp.
EmitToImageReference
();
169
var comp = CreateCompilation(src, references: new[] { CreateCompilation(libSrc, references: new[] { attrRef }).
EmitToImageReference
(), attrRef });
195
var attrRef = attrComp.
EmitToImageReference
();
211
var comp = CreateCompilation(src, references: new[] { CreateCompilation(libSrc, references: new[] { attrRef }).
EmitToImageReference
(), attrRef });
231
var attrRef = attrComp.
EmitToImageReference
();
237
var moduleRef = moduleComp.
EmitToImageReference
();
261
var attrRef = attrComp.
EmitToImageReference
();
267
var moduleRef = moduleComp.
EmitToImageReference
();
279
var comp = CreateCompilation(src, references: new[] { CreateCompilation(libSrc, references: new[] { attrRef, moduleRef }).
EmitToImageReference
(), attrRef });
316
var comp = CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
346
var comp = CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
372
var comp = CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
387
var attrRef = attrComp.
EmitToImageReference
();
412
var attrRef = attrComp.
EmitToImageReference
();
426
var comp = CreateCompilation(src, references: new[] { CreateCompilation(libSrc, references: new[] { attrRef }).
EmitToImageReference
(), attrRef });
452
var attrRef = attrComp.
EmitToImageReference
();
480
var attrRef = attrComp.
EmitToImageReference
();
496
var comp = CreateCompilation(src, references: new[] { CreateCompilation(libSrc, references: new[] { attrRef }).
EmitToImageReference
(), attrRef });
522
var attrRef = attrComp.
EmitToImageReference
();
535
var moduleRef = moduleComp.
EmitToImageReference
();
548
var assemblyRef = assemblyComp.
EmitToImageReference
();
571
var attrRef = attrComp.
EmitToImageReference
();
604
var attrRef = attrComp.
EmitToImageReference
();
621
var comp = CreateCompilation(src, references: new[] { CreateCompilation(libSrc, references: new[] { attrRef }).
EmitToImageReference
(), attrRef });
644
var attrRef = attrComp.
EmitToImageReference
();
672
var attrRef = attrComp.
EmitToImageReference
();
691
var comp = CreateCompilation(src, references: new[] { CreateCompilation(libSrc, references: new[] { attrRef }).
EmitToImageReference
(), attrRef });
732
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
779
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
822
var comp = CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
855
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
880
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
888
var missingRef = CreateCompilation("public class Base { }", assemblyName: "missing").
EmitToImageReference
();
901
var comp = CreateCompilation(src, references: new[] { CreateCompilation(libSrc, references: new[] { missingRef }).
EmitToImageReference
() });
918
var attrRef = CreateCompilation(experimentalAttributeSrc).
EmitToImageReference
();
955
var attrRef = CreateCompilation(experimentalAttributeSrc).
EmitToImageReference
();
983
var attrRef = CreateCompilation(experimentalAttributeSrc).
EmitToImageReference
();
1020
var attrRef = CreateCompilation(experimentalAttributeSrc).
EmitToImageReference
();
1062
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
1091
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
1122
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
1153
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
1184
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
1215
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
1246
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
1273
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
1297
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
1323
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
1346
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
1366
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
1744
var comp = CreateCompilation(src, references: new[] { libComp.
EmitToImageReference
() });
1804
var comp = CreateCompilation(src, references: new[] { libComp.
EmitToImageReference
() });
1845
var comp = CreateCompilation(src, references: new[] { libComp.
EmitToImageReference
() });
1886
var comp = CreateCompilation(src, references: new[] { libComp.
EmitToImageReference
() });
1968
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
2049
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
2079
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
2113
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
2143
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
2176
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
2206
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
2236
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
2263
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
2294
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
2337
: CreateCompilation(src, references: new[] { CreateCompilation(libsSrc).
EmitToImageReference
() });
2407
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
2436
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
2466
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
2496
: CreateCompilation(src, references: new[] { CreateCompilation(new[] { libSrc, experimentalAttributeSrc }).
EmitToImageReference
() });
Semantics\LockTests.cs (3)
1513
.
EmitToImageReference
();
1556
.
EmitToImageReference
();
1587
.
EmitToImageReference
();
Semantics\ParamsCollectionTests.cs (29)
1039
var myCollectionRef = myCollection.
EmitToImageReference
();
1064
var comp = CreateCompilation(src, references: [myCollectionRef, builder.
EmitToImageReference
()], targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe);
4019
verify(comp1.
EmitToImageReference
());
4086
verify(comp1.
EmitToImageReference
());
4201
verify(comp1.
EmitToImageReference
());
4325
verify(comp1.
EmitToImageReference
());
4401
verify(comp1.
EmitToImageReference
());
6347
var comp1Ref = CreateCompilation(src1).
EmitToImageReference
();
6397
var comp1Ref = CreateCompilation(src1).
EmitToImageReference
();
6562
var comp0Ref = CreateCompilation(src0).
EmitToImageReference
();
6640
var comp0Ref = CreateCompilation(src0).
EmitToImageReference
();
6887
MetadataReference comp1Ref = comp1.
EmitToImageReference
();
6900
var comp = CreateCompilation(src, references: new[] { comp1Ref, comp2.
EmitToImageReference
() }, targetFramework: TargetFramework.StandardAndCSharp, options: TestOptions.ReleaseExe);
7257
var comp1Ref = CreateCompilation(src1).
EmitToImageReference
();
7381
var comp1Ref = CreateCompilation(src1).
EmitToImageReference
();
7434
var comp1Ref = CreateCompilation(src1).
EmitToImageReference
();
7789
MetadataReference comp1Ref = comp1.
EmitToImageReference
();
7802
var comp = CreateCompilation(src, references: new[] { comp1Ref, comp2.
EmitToImageReference
() }, targetFramework: TargetFramework.StandardAndCSharp, options: TestOptions.ReleaseExe);
7980
var comp1Ref = CreateCompilation(src1).
EmitToImageReference
();
8066
var comp1Ref = CreateCompilation(src1).
EmitToImageReference
();
13160
var compilation_BinaryReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.
EmitToImageReference
(embedInteropTypes: true) });
13220
var compilation_BinaryReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.
EmitToImageReference
(embedInteropTypes: true) });
13244
var comp1Ref = comp1.
EmitToImageReference
();
13283
var compilation_BinaryReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comp1Ref, comAssembly.
EmitToImageReference
(embedInteropTypes: true) });
13344
var comp2 = CreateCompilation(src2, references: [image ? comp1.
EmitToImageReference
() : comp1.ToMetadataReference()], options: TestOptions.ReleaseExe);
13410
var comp2 = CreateCompilation(src2, references: [image ? comp1.
EmitToImageReference
() : comp1.ToMetadataReference()], options: TestOptions.ReleaseExe);
13474
var comp2 = CreateCompilation(src2, references: [image ? comp1.
EmitToImageReference
() : comp1.ToMetadataReference()], options: TestOptions.ReleaseExe);
13508
var comp1Ref = comp1.
EmitToImageReference
();
13609
var comp1Ref = comp1.
EmitToImageReference
();
Semantics\PatternMatchingTests.cs (4)
8558
var refA = comp.
EmitToImageReference
();
10162
var refA = comp.
EmitToImageReference
();
10967
var refA = comp.
EmitToImageReference
();
11325
var refA = comp.
EmitToImageReference
();
Semantics\PatternMatchingTests_ListPatterns.cs (14)
1650
var csCompilation = CreateCompilation(csSource, references: new[] { vbCompilation.
EmitToImageReference
() });
1797
var csCompilation = CreateCompilation(csSource, references: new[] { vbCompilation.
EmitToImageReference
() });
1827
var csCompilation = CreateCompilation(csSource, references: new[] { vbCompilation.
EmitToImageReference
() });
3257
.
EmitToImageReference
();
3268
.
EmitToImageReference
();
3352
.
EmitToImageReference
();
3366
.
EmitToImageReference
();
3431
var rangeComp = CreateCompilation(new[] { range_cs, TestSources.Index }, references: new[] { missingComp.
EmitToImageReference
() }, assemblyName: "range");
3433
var rangeRef = rangeComp.
EmitToImageReference
();
3450
var comp = CreateCompilation(source, references: new[] { libComp.
EmitToImageReference
(), rangeRef });
3552
var libComp = CreateCompilation(lib_cs, references: new[] { missingComp.
EmitToImageReference
() }, assemblyName: "lib");
3555
var comp = CreateCompilation(new[] { source, TestSources.Index, TestSources.Range }, references: new[] { libComp.
EmitToImageReference
() });
5348
.
EmitToImageReference
();
5360
.
EmitToImageReference
();
Semantics\PatternMatchingTests5.cs (8)
2073
var ref1 = CreateCompilation(INumberBaseDefinition, assemblyName: "A").
EmitToImageReference
();
2074
var ref2 = CreateCompilation(INumberBaseDefinition, assemblyName: "B").
EmitToImageReference
();
2120
var ref1 = CreateCompilation(INumberBaseDefinition, assemblyName: "A").
EmitToImageReference
(aliases: ImmutableArray.Create("A"));
2121
var ref2 = CreateCompilation(INumberBaseDefinition, assemblyName: "B").
EmitToImageReference
();
2234
var ref1 = CreateCompilation(INumberBaseDefinition, assemblyName: "A").
EmitToImageReference
();
2235
var ref2 = CreateCompilation(INumberBaseDefinition, assemblyName: "B").
EmitToImageReference
();
2298
var ref1 = CreateCompilation(INumberBaseDefinition).
EmitToImageReference
(aliases: ImmutableArray.Create("A"));
2299
var ref2 = CreateCompilation(INumberBaseDefinition).
EmitToImageReference
();
Semantics\PrimaryConstructorTests.cs (1)
508
var comp2 = CreateCompilation(src2, references: new[] { comp.
EmitToImageReference
() });
Semantics\RecordTests.cs (38)
4205
var comp1Ref = CreateCompilation(source1).
EmitToImageReference
();
4211
var comp2Ref = CreateCompilation(new[] { source2, IsExternalInitTypeDefinition }, references: new[] { comp1Ref }, parseOptions: TestOptions.Regular9).
EmitToImageReference
();
4236
var comp1Ref = CreateCompilation(new[] { source1, IsExternalInitTypeDefinition }, assemblyName: "Clone_12", parseOptions: TestOptions.Regular9).
EmitToImageReference
();
4242
var comp2Ref = CreateCompilation(new[] { source2, IsExternalInitTypeDefinition }, references: new[] { comp1Ref }, parseOptions: TestOptions.Regular9).
EmitToImageReference
();
4271
var comp1Ref = CreateCompilation(new[] { source1, IsExternalInitTypeDefinition }, parseOptions: TestOptions.Regular9).
EmitToImageReference
();
4277
var comp2Ref = CreateCompilation(new[] { source2, IsExternalInitTypeDefinition }, assemblyName: "Clone_13", references: new[] { comp1Ref }, parseOptions: TestOptions.Regular9).
EmitToImageReference
();
4283
var comp3Ref = CreateCompilation(new[] { source3, IsExternalInitTypeDefinition }, references: new[] { comp1Ref, comp2Ref }, parseOptions: TestOptions.Regular9).
EmitToImageReference
();
4335
var comp1Ref = CreateCompilation(source1).
EmitToImageReference
();
4341
var comp2Ref = CreateCompilation(new[] { source2, IsExternalInitTypeDefinition }, references: new[] { comp1Ref }, parseOptions: TestOptions.Regular9).
EmitToImageReference
();
4366
var comp1Ref = CreateCompilation(new[] { source1, IsExternalInitTypeDefinition }, assemblyName: "Clone_15", parseOptions: TestOptions.Regular9).
EmitToImageReference
();
4372
var comp2Ref = CreateCompilation(new[] { source2, IsExternalInitTypeDefinition }, references: new[] { comp1Ref }, parseOptions: TestOptions.Regular9).
EmitToImageReference
();
4428
var comp1Ref = CreateCompilation(new[] { source1, IsExternalInitTypeDefinition }, parseOptions: TestOptions.Regular9).
EmitToImageReference
();
4434
var comp2Ref = CreateCompilation(new[] { source2, IsExternalInitTypeDefinition }, assemblyName: "Clone_16", references: new[] { comp1Ref }, parseOptions: TestOptions.Regular9).
EmitToImageReference
();
4440
var comp3Ref = CreateCompilation(new[] { source3, IsExternalInitTypeDefinition }, references: new[] { comp1Ref, comp2Ref }, parseOptions: TestOptions.Regular9).
EmitToImageReference
();
9548
}", references: new[] { comp1.
EmitToImageReference
() }).VerifyDiagnostics();
9801
var refA = useCompilationReference ? comp.ToMetadataReference() : comp.
EmitToImageReference
();
10571
var refA = useCompilationReference ? comp.ToMetadataReference() : comp.
EmitToImageReference
();
10825
var refA = comp.
EmitToImageReference
();
10873
var refA = comp.
EmitToImageReference
();
10951
var refA = compA.
EmitToImageReference
();
11023
var refA = compA.
EmitToImageReference
();
11113
var refA = compA.
EmitToImageReference
();
12615
var refA = useCompilationReference ? compA.ToMetadataReference() : compA.
EmitToImageReference
();
13341
var refA = compA.
EmitToImageReference
();
16283
var ref0 = comp.
EmitToImageReference
();
17232
var ref0 = comp.
EmitToImageReference
();
17328
var ref0 = comp.
EmitToImageReference
();
17424
var ref0 = comp.
EmitToImageReference
();
20674
CompileAndVerify(source2, references: new[] { useImageReference ? comp1.
EmitToImageReference
() : comp1.ToMetadataReference() }, expectedOutput:
20853
references: new[] { emitRef ? comp.
EmitToImageReference
() : comp.ToMetadataReference() },
21023
references: new[] { emitRef ? comp.
EmitToImageReference
() : comp.ToMetadataReference() },
23800
var refA = useCompilationReference ? comp.ToMetadataReference() : comp.
EmitToImageReference
();
24276
var ref0 = comp.
EmitToImageReference
();
24341
var ref0 = comp.
EmitToImageReference
();
24411
var ref0 = comp.
EmitToImageReference
();
24490
var ref0 = comp.
EmitToImageReference
();
26086
var compRef = CreateCompilation(src).
EmitToImageReference
();
30188
var refA = useCompilationReference ? compA.ToMetadataReference() : compA.
EmitToImageReference
();
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (10)
IOperation\IOperationTests_IIsPatternExpression.cs (2)
1317
var compilation = CreateCompilation(source, new[] { vbCompilation.
EmitToImageReference
() }, parseOptions: TestOptions.Regular8);
1390
var compilation = CreateCompilation(source, new[] { vbCompilation.
EmitToImageReference
() });
IOperation\IOperationTests_INoPiaObjectCreationOperation.cs (7)
73
VerifyOperationTreeAndDiagnosticsForTest<ObjectCreationExpressionSyntax>(consumer, expectedOperationTree, expectedDiagnostics, references: new[] { piaCompilation.
EmitToImageReference
(embedInteropTypes: true) });
131
VerifyOperationTreeAndDiagnosticsForTest<ObjectCreationExpressionSyntax>(consumer, expectedOperationTree, expectedDiagnostics, references: new[] { piaCompilation.
EmitToImageReference
(embedInteropTypes: true) });
180
VerifyOperationTreeAndDiagnosticsForTest<ObjectCreationExpressionSyntax>(consumer, expectedOperationTree, expectedDiagnostics, references: new[] { piaCompilation.
EmitToImageReference
(embedInteropTypes: true) });
272
VerifyFlowGraphAndDiagnosticsForTest<MethodDeclarationSyntax>(consumer, expectedFlowGraph, expectedDiagnostics, references: new[] { piaCompilation.
EmitToImageReference
(embedInteropTypes: true) });
363
VerifyFlowGraphAndDiagnosticsForTest<MethodDeclarationSyntax>(consumer, expectedFlowGraph, expectedDiagnostics, references: new[] { piaCompilation.
EmitToImageReference
(embedInteropTypes: true) });
429
VerifyFlowGraphAndDiagnosticsForTest<MethodDeclarationSyntax>(consumer, expectedFlowGraph, expectedDiagnostics, references: new[] { piaCompilation.
EmitToImageReference
(embedInteropTypes: true) });
573
VerifyFlowGraphAndDiagnosticsForTest<MethodDeclarationSyntax>(consumer, expectedFlowGraph, expectedDiagnostics, references: new[] { piaCompilation.
EmitToImageReference
(embedInteropTypes: true) });
IOperation\IOperationTests_IParameterReferenceExpression.cs (1)
987
references: new[] { MscorlibRef, SystemRef, compilation0.
EmitToImageReference
(embedInteropTypes: true) });
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (518)
Semantics\AccessCheckTests.cs (2)
1446
var refA = comp.
EmitToImageReference
();
1479
var refA = comp.
EmitToImageReference
();
Semantics\BindingAsyncTasklikeMoreTests.cs (5)
1168
var ref0 = compilation0.
EmitToImageReference
();
1260
var ref0 = compilation0.
EmitToImageReference
();
1331
var ref0 = compilation0.
EmitToImageReference
();
1405
var ref0 = compilation0.
EmitToImageReference
();
1479
var ref0 = compilation0.
EmitToImageReference
();
Semantics\BindingTests.cs (14)
778
", assemblyName: "DerivedAssembly1", references: new List<MetadataReference>() { baseAssembly.
EmitToImageReference
() }).VerifyDiagnostics();
791
", references: new List<MetadataReference>() { derivedAssembly.
EmitToImageReference
() })
817
", assemblyName: "DerivedAssembly2", references: new List<MetadataReference>() { baseAssembly.
EmitToImageReference
() }).VerifyDiagnostics();
830
", references: new List<MetadataReference>() { derivedAssembly.
EmitToImageReference
() })
856
", assemblyName: "DerivedAssembly3", references: new List<MetadataReference>() { baseAssembly.
EmitToImageReference
() }).VerifyDiagnostics();
867
}", references: new List<MetadataReference>() { derivedAssembly.
EmitToImageReference
() })
1614
comp3 = CreateCompilationWithMscorlib461(source3, new MetadataReference[] { comp2.
EmitToImageReference
(), comp1.
EmitToImageReference
().WithEmbedInteropTypes(true) });
1670
comp3 = CreateCompilationWithMscorlib461(source3, new MetadataReference[] { comp2.
EmitToImageReference
(), comp1.
EmitToImageReference
().WithEmbedInteropTypes(true) });
1721
comp3 = CreateCompilationWithMscorlib461(source3, new MetadataReference[] { comp2.
EmitToImageReference
(), comp1.
EmitToImageReference
().WithEmbedInteropTypes(true) });
1772
comp3 = CreateCompilationWithMscorlib461(source3, new MetadataReference[] { comp2.
EmitToImageReference
(), comp1.
EmitToImageReference
().WithEmbedInteropTypes(true) });
Semantics\DeconstructionTests.cs (2)
1604
var libMissingRef = libMissingComp.
EmitToImageReference
();
1607
var libRef = libComp.
EmitToImageReference
();
Semantics\DelegateTypeTests.cs (20)
13564
var comp1aRef = comp1a.
EmitToImageReference
();
13573
var comp2Ref = comp2.
EmitToImageReference
();
13605
CompileAndVerify(source3, [comp2Ref, comp1b.
EmitToImageReference
()], parseOptions: TestOptions.Regular12, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics();
13606
CompileAndVerify(source3, [comp2Ref, comp1b.
EmitToImageReference
()], parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics();
13607
verifier = CompileAndVerify(source3, [comp2Ref, comp1b.
EmitToImageReference
()], symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics();
13681
var comp1aRef = comp1a.
EmitToImageReference
();
13691
var comp2Ref = comp2.
EmitToImageReference
();
13700
var comp1bRef = comp1b.
EmitToImageReference
();
13814
var comp1aRef = comp1a.
EmitToImageReference
();
13824
var comp2Ref = comp2.
EmitToImageReference
();
13833
var comp1bRef = comp1b.
EmitToImageReference
();
13930
var comp1aRef = comp1a.
EmitToImageReference
();
13939
var comp2Ref = comp2.
EmitToImageReference
();
13975
var comp1bRef = comp1b.
EmitToImageReference
();
14227
var refAttribute = comp.
EmitToImageReference
();
14238
var refA = comp.
EmitToImageReference
();
14302
var refA = comp.
EmitToImageReference
();
17367
var ref1 = comp1.
EmitToImageReference
(embedInteropTypes: true);
17390
var ref1 = comp1.
EmitToImageReference
(embedInteropTypes: true);
18862
CreateCompilation(source2, new[] { comp.
EmitToImageReference
() }).VerifyEmitDiagnostics(
Semantics\GenericConstraintsTests.cs (28)
194
).
EmitToImageReference
();
230
).
EmitToImageReference
();
269
).
EmitToImageReference
();
308
).
EmitToImageReference
();
358
var reference = CreateCompilation(code).
EmitToImageReference
();
553
}").
EmitToImageReference
();
599
}").
EmitToImageReference
();
817
}").
EmitToImageReference
();
845
}").
EmitToImageReference
();
873
}").
EmitToImageReference
();
915
var reference = CreateCompilation(code).
EmitToImageReference
();
1070
}").
EmitToImageReference
();
1114
}").
EmitToImageReference
();
1298
}").
EmitToImageReference
();
1326
}").
EmitToImageReference
();
1354
}").
EmitToImageReference
();
1397
var reference = CreateCompilation(code).
EmitToImageReference
();
1555
}").
EmitToImageReference
();
1599
}").
EmitToImageReference
();
1981
}").
EmitToImageReference
();
2017
}").
EmitToImageReference
();
2052
").
EmitToImageReference
();
2093
var reference = CreateCompilation(code).
EmitToImageReference
();
2245
}").
EmitToImageReference
();
2368
").
EmitToImageReference
();
2403
").
EmitToImageReference
();
2412
}", references: new[] { reference }).
EmitToImageReference
(); ;
2447
}").
EmitToImageReference
();
Semantics\GlobalUsingDirectiveTests.cs (8)
3359
var compWithReferenceToLib = CreateCompilation(reference_cs, references: new[] { origLibComp.
EmitToImageReference
() });
3362
MetadataReference newCompImageRef = newComp.
EmitToImageReference
();
3364
references: new[] { compWithReferenceToLib.
EmitToImageReference
(), newCompImageRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview);
3373
references: new[] { compWithReferenceToLib.
EmitToImageReference
(), newCompImageRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview);
3381
references: new[] { compWithReferenceToLib.
EmitToImageReference
(), newCompImageRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview);
3397
references: new[] { compWithReferenceToLib.
EmitToImageReference
(), newCompImageRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview);
3413
references: new[] { compWithReferenceToLib.
EmitToImageReference
(), newCompImageRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview);
3429
references: new[] { compWithReferenceToLib.
EmitToImageReference
(), newCompImageRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview);
Semantics\ImplicitObjectCreationTests.cs (9)
4240
var libComp = CreateCompilation(lib, references: new[] { missingComp.
EmitToImageReference
() });
4253
var comp = CreateCompilation(source, references: new[] { libComp.
EmitToImageReference
() });
4281
var libComp = CreateCompilation(lib, references: new[] { missingComp.
EmitToImageReference
() });
4295
var comp = CreateCompilation(source, references: new[] { libComp.
EmitToImageReference
() });
4324
var libComp = CreateCompilation(lib, references: new[] { missingComp.
EmitToImageReference
() });
4336
var comp = CreateCompilation(source, references: new[] { libComp.
EmitToImageReference
() });
4356
var libComp = CreateCompilation(lib, references: new[] { missingComp.
EmitToImageReference
() });
4369
var comp = CreateCompilation(source, references: new[] { libComp.
EmitToImageReference
() });
4630
var compilation2 = CreateCompilation(source2, references: new[] { compilation1.
EmitToImageReference
() });
Semantics\InheritanceBindingTests.cs (3)
3007
var comp2 = CreateCompilation(new[] { source2 }, references: new[] { comp12.
EmitToImageReference
() }, assemblyName: "lib2");
3024
var comp3 = CreateCompilation(new[] { source3 }, references: new[] { comp11.
EmitToImageReference
(), comp2.
EmitToImageReference
() }, assemblyName: "lib3");
Semantics\InitOnlyMemberTests.cs (21)
78
references: new[] { useMetadataImage ? lib.
EmitToImageReference
() : lib.ToMetadataReference() });
115
references: new[] { useMetadataImage ? lib.
EmitToImageReference
() : lib.ToMetadataReference() });
149
references: new[] { useMetadataImage ? lib.
EmitToImageReference
() : lib.ToMetadataReference() });
187
references: new[] { useMetadataImage ? lib.
EmitToImageReference
() : lib.ToMetadataReference() });
217
references: new[] { useMetadataImage ? lib.
EmitToImageReference
() : lib.ToMetadataReference() });
228
references: new[] { useMetadataImage ? lib.
EmitToImageReference
() : lib.ToMetadataReference() });
347
references: new[] { useMetadataImage ? lib.
EmitToImageReference
() : lib.ToMetadataReference() });
1046
var comp = CreateCompilation(new[] { source, main }, references: new[] { emitImage ? libComp.
EmitToImageReference
() : libComp.ToMetadataReference() },
1051
comp = CreateCompilation(new[] { main }, references: new[] { emitImage ? libComp.
EmitToImageReference
() : libComp.ToMetadataReference() },
1082
var comp = CreateCompilation(new[] { main }, references: new[] { emitImage ? libComp.
EmitToImageReference
() : libComp.ToMetadataReference() },
1130
var comp = CreateCompilation(new[] { source, main }, references: new[] { emitImage ? libComp.
EmitToImageReference
() : libComp.ToMetadataReference() },
1135
comp = CreateCompilation(new[] { main }, references: new[] { emitImage ? libComp.
EmitToImageReference
() : libComp.ToMetadataReference() },
1618
references: new[] { emitImage ? libComp.
EmitToImageReference
() : libComp.ToMetadataReference() },
1814
references: new[] { emitAsImage ? libComp.
EmitToImageReference
() : libComp.ToMetadataReference() });
2126
references: new[] { emitAsImage ? libComp.
EmitToImageReference
() : libComp.ToMetadataReference() });
2231
references: new[] { emitAsImage ? libComp.
EmitToImageReference
() : libComp.ToMetadataReference() });
3085
references: new[] { emitAsImage ? libComp.
EmitToImageReference
() : libComp.ToMetadataReference() },
4652
.
EmitToImageReference
();
4655
.
EmitToImageReference
();
4658
.
EmitToImageReference
();
4661
.
EmitToImageReference
();
Semantics\InteractiveUsingTests.cs (4)
322
var lib1 = CreateCompilation(string.Format(libSourceTemplate, 1), assemblyName: "Lib1").
EmitToImageReference
();
323
var lib2 = CreateCompilation(string.Format(libSourceTemplate, 2), assemblyName: "Lib2").
EmitToImageReference
();
515
var lib = CreateCompilation(libSource).
EmitToImageReference
();
556
var lib = CreateCompilation(libSource).
EmitToImageReference
();
Semantics\InterpolationTests.cs (24)
1846
foreach (var reference in new[] { comp1.
EmitToImageReference
(), comp1.ToMetadataReference() })
2262
foreach (var reference in new[] { comp1.
EmitToImageReference
(), comp1.ToMetadataReference() })
4424
var handlerRef = CreateCompilation(handlerSource).
EmitToImageReference
();
4441
var handlerRef = CreateCompilation(handlerSource).
EmitToImageReference
();
6846
var comp = CreateCompilation(@"C.M(1, $"""");", references: new[] { vbComp.
EmitToImageReference
() });
6940
var comp = CreateCompilation(@"C.M($"""");", references: new[] { vbComp.
EmitToImageReference
() });
7015
var comp = CreateCompilation(@"C.M(1, $"""");", references: new[] { vbComp.
EmitToImageReference
() });
7093
var comp = CreateCompilation(@"C.M(1, $"""");", references: new[] { vbComp.
EmitToImageReference
() });
7168
var comp = CreateCompilation(@"C.M($"""");", references: new[] { vbComp.
EmitToImageReference
() });
7276
var comp = CreateCompilation(@"C.M(1, $"""");", references: new[] { vbComp.
EmitToImageReference
() });
7316
var comp = CreateCompilation(@"C.M(1, $"""");", references: new[] { vbComp.
EmitToImageReference
() });
7356
var comp = CreateCompilation(@"C.M(1, $"""");", references: new[] { vbComp.
EmitToImageReference
() });
7396
var comp = CreateCompilation(@"C.M(1, $"""");", references: new[] { vbComp.
EmitToImageReference
() });
7473
var comp = CreateCompilation(@"C.M($"""");", references: new[] { vbComp.
EmitToImageReference
() });
7550
var comp = CreateCompilation(@"_ = new C($"""");", references: new[] { vbComp.
EmitToImageReference
() });
7631
var comp = CreateCompilation(@"C<CustomHandler>.M($"""");", references: new[] { vbComp.
EmitToImageReference
() });
7803
var comp = CreateCompilation("", references: new[] { vbComp.
EmitToImageReference
() });
7968
comp = CreateCompilation(executableCode, new[] { dependency.
EmitToImageReference
() });
8253
foreach (var d in new[] { dependency.
EmitToImageReference
(), dependency.ToMetadataReference() })
8310
foreach (var d in new[] { dependency.
EmitToImageReference
(), dependency.ToMetadataReference() })
8432
foreach (var d in new[] { dependency.
EmitToImageReference
(), dependency.ToMetadataReference() })
9165
CreateCompilation(@"C.M(1, """", " + expression + @");", new[] { comp.
EmitToImageReference
() }).VerifyDiagnostics(
13220
var comp = CreateCompilation(code, new[] { vbComp.
EmitToImageReference
() });
17514
var comp = CreateCompilation(code, references: new[] { vbComp.
EmitToImageReference
() });
Semantics\LambdaTests.cs (1)
448
comp1.
EmitToImageReference
(),
Semantics\NativeIntegerTests.cs (32)
186
var ref2 = comp.
EmitToImageReference
();
702
var ref2 = comp.
EmitToImageReference
();
846
var ref1 = comp.
EmitToImageReference
();
884
var ref2 = comp.
EmitToImageReference
();
957
var ref1 = comp.
EmitToImageReference
();
1001
var ref2 = comp.
EmitToImageReference
();
1050
var refA1 = comp.
EmitToImageReference
();
1053
var refA2 = comp.
EmitToImageReference
();
1138
var ref1 = comp.
EmitToImageReference
(EmitOptions.Default.WithRuntimeMetadataVersion("0.0.0.0"));
1218
var ref1 = comp.
EmitToImageReference
();
1470
verifyReference(comp.
EmitToImageReference
(EmitOptions.Default.WithRuntimeMetadataVersion("0.0.0.0")), includesIEquatable: true);
1496
verifyReference(comp.
EmitToImageReference
(EmitOptions.Default.WithRuntimeMetadataVersion("0.0.0.0")), includesIEquatable: false);
1513
var ref2 = comp.
EmitToImageReference
();
1595
var ref2 = comp.
EmitToImageReference
();
1648
var ref2 = comp.
EmitToImageReference
();
2432
var refA = compA.
EmitToImageReference
();
3118
var ref2 = comp.
EmitToImageReference
();
3162
var ref2 = comp.
EmitToImageReference
();
3197
var ref2 = comp.
EmitToImageReference
();
3259
var ref2 = comp.
EmitToImageReference
();
3302
var ref2 = comp.
EmitToImageReference
();
3361
var ref2 = comp.
EmitToImageReference
();
3451
var ref1 = comp.
EmitToImageReference
();
3533
var ref2 = comp.
EmitToImageReference
();
3566
var ref2 = comp.
EmitToImageReference
();
3599
var ref2 = comp.
EmitToImageReference
();
4598
var refA = comp.
EmitToImageReference
(options: EmitOptions.Default.WithRuntimeMetadataVersion("4.0.0.0"));
6942
var ref0 = comp.
EmitToImageReference
();
6971
var ref0 = comp.
EmitToImageReference
();
7004
var ref0 = comp.
EmitToImageReference
();
7219
var ref2 = comp.
EmitToImageReference
();
13281
var refA = comp.
EmitToImageReference
();
Semantics\NonTrailingNamedArgumentsTests.cs (1)
339
var verifier2 = CompileAndVerify(source, expectedOutput: "1 2.", parseOptions: TestOptions.Regular7_2, references: new[] { lib.
EmitToImageReference
() });
Semantics\NullableContextTests.cs (2)
275
var refA = CreateCompilation(sourceA).
EmitToImageReference
();
542
var refA = CreateCompilation(sourceA).
EmitToImageReference
();
Semantics\NullableReferenceTypesTests.cs (236)
8527
comp2 = CreateCompilation(new[] { client }, options: WithNullableEnable(), references: new[] { c.
EmitToImageReference
() });
8707
var ref0 = comp0.
EmitToImageReference
();
8814
var metadataRefs0 = new[] { comp0.
EmitToImageReference
() };
8837
metadataRefs0 = new[] { comp0.
EmitToImageReference
() };
8867
metadataRefs0 = new[] { comp0.
EmitToImageReference
() };
8948
var comp1B = CreateCompilation(source1, references: new[] { comp0.
EmitToImageReference
() });
8998
var comp1B = CreateCompilation(source1, references: new[] { comp0.
EmitToImageReference
() });
9084
references: new[] { comp0.
EmitToImageReference
() });
9175
references: new[] { comp0.
EmitToImageReference
() });
9244
var ref0 = comp0.
EmitToImageReference
();
9248
var ref1 = comp1.
EmitToImageReference
();
9334
var ref0 = comp0.
EmitToImageReference
();
9338
var ref1 = comp1.
EmitToImageReference
();
9370
ref0 = comp0.
EmitToImageReference
();
9374
ref1 = comp1.
EmitToImageReference
();
9430
comp1 = CreateCompilation(source1, references: new[] { comp0.
EmitToImageReference
() });
9503
var lib2 = CreateCompilation(lib2_cs, references: new[] { lib.
EmitToImageReference
() }, assemblyName: "lib2");
9509
var comp = CreateCompilation(source_cs, references: new[] { lib2.
EmitToImageReference
() });
9654
parseOptions: TestOptions.Regular8, references: new[] { obliviousComp.
EmitToImageReference
(), libComp.
EmitToImageReference
() });
9805
parseOptions: TestOptions.Regular8, references: new[] { obliviousComp.
EmitToImageReference
(), libComp.
EmitToImageReference
() });
9924
parseOptions: TestOptions.Regular8, references: new[] { obliviousComp.
EmitToImageReference
(), libComp.
EmitToImageReference
() });
10033
parseOptions: TestOptions.Regular8, references: new[] { obliviousComp.
EmitToImageReference
(), libComp.
EmitToImageReference
() });
10162
parseOptions: TestOptions.Regular8, references: new[] { obliviousComp.
EmitToImageReference
(), libComp.
EmitToImageReference
() });
10279
parseOptions: TestOptions.Regular8, references: new[] { obliviousComp.
EmitToImageReference
(), libComp.
EmitToImageReference
() });
10316
parseOptions: TestOptions.Regular8, references: new[] { obliviousComp.
EmitToImageReference
() });
10442
parseOptions: TestOptions.Regular8, references: new[] { obliviousComp.
EmitToImageReference
() });
14336
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
14388
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
17888
compilation = CreateCompilation("", references: new[] { compilation.
EmitToImageReference
() }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All));
19789
" }, options: WithNullableEnable(), references: new[] { c0.
EmitToImageReference
() });
19854
" }, options: WithNullableEnable(), references: new[] { c0.
EmitToImageReference
() });
19904
" }, options: WithNullableEnable(), references: new[] { c0.
EmitToImageReference
() });
19966
" }, options: WithNullableEnable(), references: new[] { c0.
EmitToImageReference
() });
20019
" }, options: WithNullableEnable(), references: new[] { c0.
EmitToImageReference
() });
20096
" }, options: WithNullableEnable(), references: new[] { c0.
EmitToImageReference
() });
20154
" }, options: WithNullableEnable(), references: new[] { c0.
EmitToImageReference
() });
20288
" }, options: WithNullableEnable(), references: new[] { c0.
EmitToImageReference
() });
23114
", references: new[] { libComp.
EmitToImageReference
() }, parseOptions: TestOptions.Regular9);
23348
", new[] { libComp.
EmitToImageReference
() }, parseOptions: TestOptions.Regular9);
23568
" }, references: new[] { libComp.
EmitToImageReference
() }, parseOptions: TestOptions.Regular8);
25489
", references: new[] { libComp.
EmitToImageReference
() }, parseOptions: TestOptions.Regular9);
25559
", references: new[] { libComp.
EmitToImageReference
() }, parseOptions: TestOptions.Regular9);
25699
", references: new[] { libComp.
EmitToImageReference
() }, parseOptions: TestOptions.Regular9);
28909
", references: new[] { lib.
EmitToImageReference
() });
28939
", references: new[] { lib.
EmitToImageReference
() });
29109
", references: new[] { lib.
EmitToImageReference
() });
29139
", references: new[] { lib.
EmitToImageReference
() });
30160
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
30388
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
30607
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
30785
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
32021
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
33142
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
33177
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
33212
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
33249
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
33291
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
33421
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
33456
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
33495
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
33550
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
33590
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
33637
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
33684
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
33762
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
33812
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
33924
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
33999
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
34309
var reference = CreateNullableCompilation(new[] { source1, NotNullIfNotNullAttributeDefinition }).
EmitToImageReference
();
36692
" }, options: WithNullableEnable(), references: new[] { libComp.
EmitToImageReference
() });
36785
" }, options: WithNullableEnable(), references: new[] { obliviousComp.
EmitToImageReference
() });
36991
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
37151
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
37188
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
37235
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
38077
var compilation2 = CreateCompilation("", references: new[] { compilation.
EmitToImageReference
() });
40307
var ref0 = comp.
EmitToImageReference
();
40420
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
40525
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
40772
var comp = CreateNullableCompilation(new[] { source, MaybeNullAttributeDefinition }, references: new[] { lib.
EmitToImageReference
() });
40948
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
41083
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
41123
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
44289
var ref0 = comp.
EmitToImageReference
();
44351
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
44566
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
44876
references: new[] { lib.
EmitToImageReference
() });
44939
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
45503
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
45539
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
45575
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
45609
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
45644
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
45678
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
46237
var ref0 = comp.
EmitToImageReference
();
46287
var ref0 = comp.
EmitToImageReference
();
46794
var ref0 = comp.
EmitToImageReference
();
46850
var ref0 = comp.
EmitToImageReference
();
47455
var ref0 = comp.
EmitToImageReference
();
47503
var ref0 = comp.
EmitToImageReference
();
47544
var ref0 = comp.
EmitToImageReference
();
47683
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
47966
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
48076
var comp = CreateNullableCompilation(source, references: new[] { lib.
EmitToImageReference
() });
48419
var comp2 = CreateNullableCompilation(source2, references: new[] { comp.
EmitToImageReference
() });
56664
var ref0 = comp0.
EmitToImageReference
();
56713
var ref0 = comp0.
EmitToImageReference
();
56788
var ref0 = comp0.
EmitToImageReference
();
56852
var ref0 = comp0.
EmitToImageReference
();
56899
var ref0 = comp0.
EmitToImageReference
();
56945
var ref0 = comp0.
EmitToImageReference
();
57306
var ref0 = comp0.
EmitToImageReference
();
57552
var ref0 = comp0.
EmitToImageReference
();
57567
var ref1 = comp1.
EmitToImageReference
();
58435
var ref0 = comp0.
EmitToImageReference
();
58450
var ref1 = comp1.
EmitToImageReference
();
58861
var comp1 = CreateCompilation(new[] { source1 }, options: WithNullableEnable(), references: new[] { comp0.
EmitToImageReference
() });
58919
var comp1 = CreateCompilation(new[] { source1 }, options: WithNullableEnable(), references: new[] { comp0.
EmitToImageReference
() });
60343
var ref0 = comp0.
EmitToImageReference
();
60468
var ref0 = comp0.
EmitToImageReference
();
60530
var ref0 = comp0.
EmitToImageReference
();
60585
var ref0 = comp0.
EmitToImageReference
();
60663
var ref0 = comp0.
EmitToImageReference
();
60752
var ref0 = comp0.
EmitToImageReference
();
60857
var ref0 = comp0.
EmitToImageReference
();
61144
var ref0 = comp0.
EmitToImageReference
();
63867
" }, options: WithNullableEnable(), references: new[] { notAnnotated.
EmitToImageReference
() });
64605
var ref0 = comp0.
EmitToImageReference
();
64663
var ref0 = comp0.
EmitToImageReference
();
64736
var ref0 = comp0.
EmitToImageReference
();
75989
var comp2 = CreateCompilation(source2, references: new[] { comp.
EmitToImageReference
() }, options: WithNullableEnable());
76031
var comp2 = CreateCompilation(source2, references: new[] { comp.
EmitToImageReference
() }, options: WithNullableEnable());
77104
references: new[] { c0.
EmitToImageReference
() });
77145
references: new[] { c0.
EmitToImageReference
() });
77377
c = CreateCompilation(new[] { source2 }, new[] { c1.
EmitToImageReference
() },
77512
c = CreateCompilation(new[] { source2 }, new[] { c1.
EmitToImageReference
() },
77545
c = CreateCompilation(new[] { source2 }, new[] { c1.
EmitToImageReference
() },
77684
c = CreateCompilation(new[] { source2 }, new[] { c1.
EmitToImageReference
() },
77825
c = CreateCompilation(new[] { source2 }, new[] { c1.
EmitToImageReference
() },
77996
c = CreateCompilation(new[] { source2 }, new[] { c1.
EmitToImageReference
() },
78884
references: new[] { compA.
EmitToImageReference
() });
81402
var ref0 = comp0.
EmitToImageReference
();
81874
var comp = CreateCompilation(source, references: new[] { libComp.
EmitToImageReference
() }, parseOptions: TestOptions.Regular7_3);
81881
var comp2 = CreateCompilation(source, references: new[] { libComp.
EmitToImageReference
() });
89236
var comp1 = CreateCompilation(new[] { source1 }, options: WithNullableEnable(), references: new[] { comp0.
EmitToImageReference
() });
92822
var ref0 = comp0.
EmitToImageReference
();
92880
var ref0 = comp0.
EmitToImageReference
();
92922
var ref0 = comp0.
EmitToImageReference
();
92993
var ref0 = comp0.
EmitToImageReference
();
93037
var ref0 = comp0.
EmitToImageReference
();
93110
var ref0 = comp0.
EmitToImageReference
();
93154
var ref0 = comp0.
EmitToImageReference
();
93255
var ref0 = comp0.
EmitToImageReference
();
93296
var ref0 = comp0.
EmitToImageReference
();
93343
var ref0 = comp0.
EmitToImageReference
();
93538
var ref0 = comp0.
EmitToImageReference
();
93594
var ref0 = comp0.
EmitToImageReference
();
93667
var ref0 = comp0.
EmitToImageReference
();
93795
var ref0 = comp0.
EmitToImageReference
();
93833
var ref0 = comp0.
EmitToImageReference
();
93919
var ref0 = comp0.
EmitToImageReference
();
94131
var ref0 = comp0.
EmitToImageReference
();
94145
var ref1 = comp1.
EmitToImageReference
();
95149
var ref0 = comp0.
EmitToImageReference
();
98324
var comp2 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), references: new[] { comp1.
EmitToImageReference
() })
98367
references: new[] { comp1.
EmitToImageReference
() },
98409
var comp2 = CreateCompilation(new[] { source2 }, references: new[] { comp1.
EmitToImageReference
() });
98775
references: new[] { comp1.
EmitToImageReference
() });
98846
references: new[] { comp1.
EmitToImageReference
(), comp2.
EmitToImageReference
() });
98915
var comp2 = CreateCompilation(new[] { source2 }, references: new[] { comp1.
EmitToImageReference
() });
99453
var comp3 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), references: new[] { comp1.
EmitToImageReference
() });
99459
var comp5 = CreateCompilation(new[] { source2 }, options: WithNullableDisable(), references: new[] { comp1.
EmitToImageReference
() });
101287
foreach (var reference in new[] { comp1.ToMetadataReference(), comp1.
EmitToImageReference
() })
101368
foreach (var reference in new[] { comp1.ToMetadataReference(), comp1.
EmitToImageReference
() })
104896
var comp2 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), references: new[] { comp1.
EmitToImageReference
() });
104972
references: new[] { comp1.
EmitToImageReference
(), comp2.
EmitToImageReference
() },
105600
var comp2 = CreateCompilation(new[] { source2 }, references: new[] { comp1.
EmitToImageReference
() });
106107
foreach (var reference in new[] { comp1.ToMetadataReference(), comp1.
EmitToImageReference
() })
107401
var comp2 = CreateCompilation(new[] { source2 }, references: new[] { comp1.
EmitToImageReference
() });
109251
foreach (var reference in new[] { comp0.ToMetadataReference(), comp0.
EmitToImageReference
() })
111003
ref0 = comp.
EmitToImageReference
();
111323
var ref0 = comp0.
EmitToImageReference
();
111342
var ref0 = comp0.
EmitToImageReference
();
111372
var ref0 = comp0.
EmitToImageReference
();
111408
var ref0 = comp0.
EmitToImageReference
();
111441
var ref0 = comp0.
EmitToImageReference
();
111477
var ref0 = comp0.
EmitToImageReference
();
111510
var ref0 = comp0.
EmitToImageReference
();
111551
var ref0 = comp0.
EmitToImageReference
();
111679
comp = CreateCompilation(new[] { source }, options: WithNullableEnable(), references: new[] { comp0.
EmitToImageReference
() });
111847
var ref0 = comp0.
EmitToImageReference
();
111889
var ref0 = comp0.
EmitToImageReference
();
111910
var ref0 = comp0.
EmitToImageReference
();
111984
var ref0 = comp0.
EmitToImageReference
();
112072
var ref0 = comp0.
EmitToImageReference
();
112127
var ref0 = comp0.
EmitToImageReference
();
112212
var ref0 = comp0.
EmitToImageReference
();
112280
var ref0 = comp0.
EmitToImageReference
();
112533
var ref0 = comp0.
EmitToImageReference
();
112556
ref0 = comp0.
EmitToImageReference
();
112568
ref0 = comp0.
EmitToImageReference
();
112670
ref0 = comp0.
EmitToImageReference
();
116159
var comp2 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
EmitToImageReference
() });
116197
var comp2 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
EmitToImageReference
() });
116234
var comp2 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
EmitToImageReference
() });
116271
var comp2 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
EmitToImageReference
() });
116313
var comp2 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
EmitToImageReference
() });
116355
var comp2 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
EmitToImageReference
() });
116396
var comp2 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
EmitToImageReference
() });
116440
var comp2 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
EmitToImageReference
() });
116481
var comp2 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
EmitToImageReference
() });
116524
var comp2 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
EmitToImageReference
() });
116632
var compilation2 = CreateEmptyCompilation(source2, options: WithNullableEnable(TestOptions.ReleaseDll), references: new[] { compilation1.
EmitToImageReference
(), MinCorlibRef });
116656
var compilation4 = CreateEmptyCompilation(source2, options: WithNullableEnable(TestOptions.ReleaseDll), references: new[] { compilation1.
EmitToImageReference
() });
116724
var compilation6 = CreateEmptyCompilation(source2, options: WithNullableEnable(TestOptions.ReleaseDll), references: new[] { compilation1.
EmitToImageReference
(), MscorlibRef });
138718
var comp1 = CreateCompilation(source1, assemblyName: nameof(source1)).VerifyDiagnostics().
EmitToImageReference
();
143442
var comp = CreateCompilation(source, references: new[] { vbComp.
EmitToImageReference
() });
143476
var comp = CreateCompilation(source, references: new[] { vbComp.
EmitToImageReference
() });
143512
var comp = CreateCompilation(source, references: new[] { vbComp.
EmitToImageReference
() });
143554
var comp = CreateCompilation(source, references: new[] { vbComp.
EmitToImageReference
() });
144960
.
EmitToImageReference
();
155815
var nullableAttrRef = useImageReference ? nullableAttrComp.
EmitToImageReference
() : nullableAttrComp.ToMetadataReference();
155834
var libRef = useImageReference ? lib.
EmitToImageReference
() : lib.ToMetadataReference();
155858
references: new[] { comp.
EmitToImageReference
(), libRef, nullableAttrRef },
156547
var ref0 = comp.
EmitToImageReference
();
156595
var ref0 = comp.
EmitToImageReference
();
157009
var ref0 = comp.
EmitToImageReference
();
157045
var ref0 = comp.
EmitToImageReference
();
Semantics\NullableTests.cs (1)
1800
references: new MetadataReference[] { complib.
EmitToImageReference
() },
Semantics\OverloadResolutionTests.cs (7)
11523
CreateCompilation(code, references: new[] { libComp.
EmitToImageReference
() }).VerifyDiagnostics(
11754
var ref0 = CreateCompilation(source0).
EmitToImageReference
();
11755
var ref1 = CreateCompilation(source1, references: new[] { ref0 }).
EmitToImageReference
();
11803
var ref0 = CreateCompilation(source0).
EmitToImageReference
();
11804
var ref1 = CreateCompilation(source1, references: new[] { ref0 }).
EmitToImageReference
();
11853
var ref0 = CreateCompilation(source0).
EmitToImageReference
();
11854
var ref1 = CreateCompilation(source1, references: new[] { ref0 }).
EmitToImageReference
();
Semantics\QueryTests.cs (1)
4557
", references: new[] { vb.
EmitToImageReference
() }, expectedOutput: "2");
Semantics\RawInterpolationTests_Handler.cs (23)
214
foreach (var reference in new[] { comp1.
EmitToImageReference
(), comp1.ToMetadataReference() })
632
foreach (var reference in new[] { comp1.
EmitToImageReference
(), comp1.ToMetadataReference() })
2701
var handlerRef = CreateCompilation(handlerSource).
EmitToImageReference
();
2717
var handlerRef = CreateCompilation(handlerSource).
EmitToImageReference
();
5104
"""""");", references: new[] { vbComp.
EmitToImageReference
() });
5210
"""""");", references: new[] { vbComp.
EmitToImageReference
() });
5297
"""""");", references: new[] { vbComp.
EmitToImageReference
() });
5387
"""""");", references: new[] { vbComp.
EmitToImageReference
() });
5474
"""""");", references: new[] { vbComp.
EmitToImageReference
() });
5561
"""""");", references: new[] { vbComp.
EmitToImageReference
() });
5608
"""""");", references: new[] { vbComp.
EmitToImageReference
() });
5655
"""""");", references: new[] { vbComp.
EmitToImageReference
() });
5744
"""""");", references: new[] { vbComp.
EmitToImageReference
() });
5833
"""""");", references: new[] { vbComp.
EmitToImageReference
() });
5926
"""""");", references: new[] { vbComp.
EmitToImageReference
() });
5971
var comp = CreateCompilation("", references: new[] { vbComp.
EmitToImageReference
() });
6155
comp = CreateCompilation(executableCode, new[] { dependency.
EmitToImageReference
() });
6428
foreach (var d in new[] { dependency.
EmitToImageReference
(), dependency.ToMetadataReference() })
6487
foreach (var d in new[] { dependency.
EmitToImageReference
(), dependency.ToMetadataReference() })
6611
foreach (var d in new[] { dependency.
EmitToImageReference
(), dependency.ToMetadataReference() })
7360
CreateCompilation(@"C.M(1, """", " + expression + @");", new[] { comp.
EmitToImageReference
() }).VerifyDiagnostics(
9815
var comp = CreateCompilation(code, new[] { vbComp.
EmitToImageReference
() });
12921
var comp = CreateCompilation(code, references: new[] { vbComp.
EmitToImageReference
() });
Semantics\ReadOnlyStructsTests.cs (4)
1611
var moduleMetadata = CreateCompilation(csharp, options: TestOptions.DebugModule, targetFramework: TargetFramework.Mscorlib461).
EmitToImageReference
();
1616
var dllMetadata = CreateCompilation(csharp, options: TestOptions.DebugDll, targetFramework: TargetFramework.Mscorlib461).
EmitToImageReference
();
1639
var moduleMetadata = CreateCompilation(csharp, options: TestOptions.DebugModule, targetFramework: TargetFramework.Mscorlib461).
EmitToImageReference
();
1644
var dllMetadata = CreateCompilation(csharp, options: TestOptions.DebugDll, targetFramework: TargetFramework.Mscorlib461).
EmitToImageReference
();
Semantics\RecordStructTests.cs (4)
188
var comp2 = CreateCompilation(src2, references: new[] { comp.
EmitToImageReference
() });
2285
var corlibRef = CreateEmptyCompilation(corlib_cs).
EmitToImageReference
();
2387
var corlibRef = CreateEmptyCompilation(corlib_cs).
EmitToImageReference
();
5085
CompileAndVerify(source2, references: new[] { useImageReference ? comp1.
EmitToImageReference
() : comp1.ToMetadataReference() }, expectedOutput: @"
Semantics\RefEscapingTests.cs (2)
8238
comp1 = CreateCompilation(source1, references: new[] { comp0.
EmitToImageReference
() }, parseOptions: TestOptions.Regular11);
8248
comp1 = CreateCompilation(source1, references: new[] { comp0.
EmitToImageReference
() }, parseOptions: TestOptions.Regular10);
Semantics\RefExtensionMethodsTests.cs (7)
396
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "55");
566
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "55");
941
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "55");
2336
references: new[] { reference.
EmitToImageReference
() }).VerifyDiagnostics(
2342
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5");
2440
references: new[] { reference.
EmitToImageReference
() }).VerifyDiagnostics(
2446
CompileAndVerify(code, references: new[] { reference.
EmitToImageReference
() }, expectedOutput: "5");
Semantics\RefFieldTests.cs (20)
542
var refB = comp.
EmitToImageReference
();
1488
var comp = CreateCompilation(source, references: new[] { spanReference.
EmitToImageReference
() }, options: TestOptions.UnsafeReleaseDll, targetFramework: TargetFramework.Net70);
1544
var comp = CreateCompilation(source, references: new[] { spanReference.
EmitToImageReference
() }, options: TestOptions.UnsafeReleaseDll, targetFramework: TargetFramework.Net70);
1596
var comp = CreateCompilation(source, references: new[] { spanReference.
EmitToImageReference
() }, options: TestOptions.UnsafeReleaseDll, targetFramework: TargetFramework.Net70);
1652
var comp = CreateCompilation(source, references: new[] { spanReference.
EmitToImageReference
() }, options: TestOptions.UnsafeReleaseDll, targetFramework: TargetFramework.Net70);
2004
var refB = verifier.Compilation.
EmitToImageReference
();
2229
var refA = compA.
EmitToImageReference
(emitOptions);
2247
var refB = compB.
EmitToImageReference
();
2262
references: new[] { refB, compA.
EmitToImageReference
() },
10158
var refA = comp.
EmitToImageReference
();
15743
var refA = comp.
EmitToImageReference
(embedInteropTypes: true);
20356
var comp = CreateCompilation(source, references: new[] { lib.
EmitToImageReference
() }, parseOptions: TestOptions.Regular10, targetFramework: TargetFramework.Net70);
20369
comp = CreateCompilation(source, references: new[] { lib.
EmitToImageReference
() }, parseOptions: TestOptions.Regular10);
26592
var ref0 = comp.
EmitToImageReference
(Microsoft.CodeAnalysis.Emit.EmitOptions.Default.WithRuntimeMetadataVersion("0.0.0.0"));
26601
var ref1 = comp.
EmitToImageReference
();
26649
var refLowerVersion = comp.
EmitToImageReference
();
26653
var refHigherVersion = comp.
EmitToImageReference
();
26662
var ref1 = comp.
EmitToImageReference
();
26717
var ref0 = comp.
EmitToImageReference
(Microsoft.CodeAnalysis.Emit.EmitOptions.Default.WithRuntimeMetadataVersion("0.0.0.0"));
26726
var ref1 = comp.
EmitToImageReference
();
Semantics\SpanStackSafetyTests.cs (4)
1946
references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef, reference.
EmitToImageReference
() },
1980
references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef, reference.
EmitToImageReference
() },
2024
references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef, reference.
EmitToImageReference
() },
2065
references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef, reference.
EmitToImageReference
() },
Semantics\StructConstructorTests.cs (1)
3665
var refA = comp.
EmitToImageReference
(embedInteropTypes: true);
Semantics\UnsafeTests.cs (3)
61
var ref1 = comp1.
EmitToImageReference
();
5934
var comp = CreateCompilation(src, options: TestOptions.UnsafeDebugDll, references: new[] { libComp.
EmitToImageReference
() });
6345
var metadata = CreateCompilation(externalCode).
EmitToImageReference
();
Semantics\UseSiteErrorTests.cs (19)
1075
var xRef = CreateCompilation(xSource, assemblyName: "Test").
EmitToImageReference
();
1107
var xRef = CreateCompilation(xSource, assemblyName: "X").
EmitToImageReference
();
1136
var xRef = CreateCompilation(xSource, assemblyName: "X").
EmitToImageReference
();
1661
var missingRef = CreateCompilation(missingSource, assemblyName: "Missing").
EmitToImageReference
();
1662
var libRef = CreateCompilation(libSource, new[] { missingRef }).
EmitToImageReference
();
1732
var missingRef = CreateCompilation(missingSource, assemblyName: "Missing").
EmitToImageReference
();
1733
var libRef = CreateCompilation(libSource, new[] { missingRef }).
EmitToImageReference
();
1787
var missingRef = CreateCompilation(missingSource, assemblyName: "Missing").
EmitToImageReference
();
1788
var libRef = CreateCompilation(libSource, new[] { missingRef }).
EmitToImageReference
();
1844
var missingRef = CreateCompilation(missingSource, assemblyName: "Missing").
EmitToImageReference
();
1845
var libRef = CreateCompilation(libSource, new[] { missingRef }).
EmitToImageReference
();
1901
var missingRef = CreateCompilation(missingSource, assemblyName: "Missing").
EmitToImageReference
();
1902
var libRef = CreateCompilation(libSource, new[] { missingRef }).
EmitToImageReference
();
1948
var missingRef = CreateCompilation(missingSource, assemblyName: "Missing").
EmitToImageReference
();
1949
var libRef = CreateCompilation(libSource, new[] { missingRef }).
EmitToImageReference
();
2233
comp3 = CreateCompilation(source3, new MetadataReference[] { comp2.
EmitToImageReference
() });
2322
var compilation2 = CreateEmptyCompilation(source2, parseOptions: parseOptions, options: TestOptions.ReleaseDll, references: new[] { compilation1.
EmitToImageReference
(), MinCorlibRef });
2344
var compilation4 = CreateEmptyCompilation(source2, parseOptions: parseOptions, options: TestOptions.ReleaseDll, references: new[] { compilation1.
EmitToImageReference
() });
2389
var compilation6 = CreateEmptyCompilation(source2, parseOptions: parseOptions, options: TestOptions.ReleaseDll, references: new[] { compilation1.
EmitToImageReference
(), MscorlibRef });
Semantics\WarningVersionTests.cs (9)
132
var moduleReference = new[] { comp1.
EmitToImageReference
() };
210
var moduleReference = new[] { comp1.
EmitToImageReference
() };
289
var moduleReference = new[] { comp1.
EmitToImageReference
() };
383
var moduleReference = comp1.
EmitToImageReference
();
411
var moduleReference = new[] { comp1.
EmitToImageReference
() };
498
var moduleReference = new[] { comp1.
EmitToImageReference
() };
585
var moduleReference = new[] { comp1.
EmitToImageReference
() };
672
var moduleReference = comp1.
EmitToImageReference
();
702
var moduleReference = comp1.
EmitToImageReference
();
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (1)
1240
var comp0 = CreateCompilation(source0).VerifyDiagnostics().
EmitToImageReference
();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (662)
BadSymbolReference.cs (9)
796
var libRef = CreateEmptyCompilation(libSource, new[] { MscorlibRef }, assemblyName: "System.Drawing").
EmitToImageReference
();
815
var comp3 = CreateEmptyCompilation(project3Source, new[] { MscorlibRef, comp1.
EmitToImageReference
(), comp2.
EmitToImageReference
() }, assemblyName: "Project3");
1010
lib4 = CreateCompilation(lib4Def, new[] { lib1.
EmitToImageReference
(), lib3.
EmitToImageReference
() }, TestOptions.ReleaseDll);
1249
lib4 = CreateCompilation(lib4Def, new[] { lib1.
EmitToImageReference
(), lib3.
EmitToImageReference
() }, TestOptions.ReleaseDll);
1428
lib4 = CreateCompilation(lib4Def, new[] { lib1.
EmitToImageReference
(), lib3.
EmitToImageReference
() }, TestOptions.ReleaseDll);
Compilation\CompilationAPITests.cs (25)
617
var mtref = refcomp.
EmitToImageReference
(aliases: ImmutableArray.Create("a", "Alias(*#$@^%*&)"));
685
var mtref = refcomp.
EmitToImageReference
(aliases: ImmutableArray.Create("a", "Alias(*#$@^%*&)"));
989
references: new MetadataReference[] { netModule1.
EmitToImageReference
() },
1003
references: new MetadataReference[] { netModule2.
EmitToImageReference
() },
1018
references: new MetadataReference[] { netModule1.
EmitToImageReference
(), netModule2.
EmitToImageReference
() },
1045
references: new MetadataReference[] { netModule1.
EmitToImageReference
() },
1059
references: new MetadataReference[] { netModule1.
EmitToImageReference
() },
1073
references: new MetadataReference[] { netModule2.
EmitToImageReference
(), netModule3.
EmitToImageReference
() },
1109
references: new MetadataReference[] { netModule1.
EmitToImageReference
() },
1134
references: new MetadataReference[] { netModule1.
EmitToImageReference
() },
1148
references: new MetadataReference[] { netModule1.
EmitToImageReference
(), netModule2.
EmitToImageReference
() },
3421
{accessibility} class C<T> {{}}", new[] { useMetadataReference ? referenceComp.ToMetadataReference() : referenceComp.
EmitToImageReference
() });
3442
{accessibility} class C<T> {{}}", new[] { useMetadataReference ? referenceComp.ToMetadataReference() : referenceComp.
EmitToImageReference
() });
3470
MetadataReference reference = useMetadataReference ? referenceComp.ToMetadataReference() : referenceComp.
EmitToImageReference
();
3498
MetadataReference reference = useMetadataReference ? referenceComp.ToMetadataReference() : referenceComp.
EmitToImageReference
();
3545
return useMetadataReference ? referenceComp1.ToMetadataReference() : referenceComp1.
EmitToImageReference
();
3585
return useMetadataReference ? referenceComp1.ToMetadataReference() : referenceComp1.
EmitToImageReference
();
3604
var corlibReference = corlib.
EmitToImageReference
();
3607
var otherReference = other.
EmitToImageReference
();
3639
var corlibReference = corlib.
EmitToImageReference
(aliases: ImmutableArray.Create("corlib"));
3664
var corlibReference = corlib.
EmitToImageReference
();
3667
var otherReference = other.
EmitToImageReference
(aliases: ImmutableArray.Create("other"));
Compilation\ReferenceManagerTests.cs (91)
39
var ifaceImageRef = ifaceDef.
EmitToImageReference
();
1733
var refLib = ((MetadataImageReference)lib.
EmitToImageReference
()).WithEmbedInteropTypes(true);
1764
var moduleRef = CreateCompilation("public class TypeFromModule : TypeDependedOnByModule { }", new[] { assemblyRef }, options: TestOptions.ReleaseModule, assemblyName: "lib2").
EmitToImageReference
();
1815
var moduleRef = CreateCompilation("public class C { }", options: TestOptions.ReleaseModule, assemblyName: "lib").
EmitToImageReference
();
1865
var moduleRef = module.
EmitToImageReference
();
2066
libBv1.
EmitToImageReference
();
2067
libBv2.
EmitToImageReference
();
2089
libAv1.
EmitToImageReference
();
2180
var refVectors40 = vectors40.
EmitToImageReference
();
2181
var refVectors41 = vectors41.
EmitToImageReference
();
2248
CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public class C {}", new[] { MscorlibRef }, assemblyName: "C").
EmitToImageReference
(),
2317
var bRef = CreateCompilationWithMscorlib461("public class B { }", assemblyName: "B").
EmitToImageReference
();
2318
var aRef = CreateCompilationWithMscorlib461("public class A : B { }", new[] { bRef }, assemblyName: "A").
EmitToImageReference
();
2347
var bRef = CreateCompilationWithMscorlib461("public class B { }", assemblyName: "B").
EmitToImageReference
();
2348
var aRef = CreateCompilationWithMscorlib461("public class A : B { }", new[] { bRef }, assemblyName: "A").
EmitToImageReference
();
2379
var bRef = CreateCompilationWithMscorlib461("public class B { }", assemblyName: "B").
EmitToImageReference
();
2380
var aRef = CreateCompilationWithMscorlib461("public class A : B { }", new[] { bRef }, assemblyName: "A").
EmitToImageReference
();
2415
var bRef = CreateCompilationWithMscorlib461("public class B { }", assemblyName: "B").
EmitToImageReference
();
2416
var aRef = CreateCompilationWithMscorlib461("public class A : B { }", new[] { bRef }, assemblyName: "A").
EmitToImageReference
();
2451
var bRef = CreateCompilationWithMscorlib461("public class B { }", assemblyName: "B").
EmitToImageReference
();
2452
var aRef = CreateCompilationWithMscorlib461("public class A : B { }", new[] { bRef }, assemblyName: "A").
EmitToImageReference
();
2489
var bRef = CreateCompilationWithMscorlib461("public class B { }", assemblyName: "B").
EmitToImageReference
();
2490
var aRef = CreateCompilationWithMscorlib461("public class A : B { }", new[] { bRef }, assemblyName: "A").
EmitToImageReference
();
2491
var dRef = CreateCompilationWithMscorlib461("public class D : A { }", new[] { aRef, bRef }, assemblyName: "D").
EmitToImageReference
();
2527
var bRef = CreateCompilationWithMscorlib46("public class B { }", assemblyName: "B").
EmitToImageReference
();
2528
var aRef = CreateCompilationWithMscorlib46("public class A : B { }", new[] { bRef }, assemblyName: "A").
EmitToImageReference
();
2549
var bRef = CreateCompilationWithMscorlib46("public class B { }", assemblyName: "B").
EmitToImageReference
();
2550
var aRef = CreateCompilationWithMscorlib46("public class A : B { }", new[] { bRef }, assemblyName: "A").
EmitToImageReference
();
2577
var b1Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public class B { }", new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
2578
var b2Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] public class B { }", new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
2579
var b3Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""3.0.0.0"")] public class B { }", new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
2581
var aRef = CreateEmptyCompilation("public class A : B { }", new[] { MscorlibRef, b1Ref }, assemblyName: "A").
EmitToImageReference
();
2582
var dRef = CreateEmptyCompilation("public class D : B { }", new[] { MscorlibRef, b2Ref }, assemblyName: "D").
EmitToImageReference
();
2631
var b1Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface B { }", new[] { MscorlibRef }, assemblyName: "B").
EmitToImageReference
();
2632
var b2Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] public interface B { }", new[] { MscorlibRef }, assemblyName: "B").
EmitToImageReference
();
2633
var b3Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""3.0.0.0"")] public interface B { }", new[] { MscorlibRef }, assemblyName: "B").
EmitToImageReference
();
2634
var b4Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""4.0.0.0"")] public interface B { }", new[] { MscorlibRef }, assemblyName: "B").
EmitToImageReference
();
2636
var aRef = CreateEmptyCompilation(@"public interface A : B { }", new[] { MscorlibRef, b1Ref }, assemblyName: "A").
EmitToImageReference
();
2637
var dRef = CreateEmptyCompilation(@"public interface D : B { }", new[] { MscorlibRef, b2Ref }, assemblyName: "D").
EmitToImageReference
();
2667
var b1Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface B { }", new[] { MscorlibRef }, assemblyName: "B").
EmitToImageReference
();
2668
var b2Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] public interface B { }", new[] { MscorlibRef }, assemblyName: "B").
EmitToImageReference
();
2669
var b3Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""3.0.0.0"")] public interface B { }", new[] { MscorlibRef }, assemblyName: "B").
EmitToImageReference
();
2670
var b4Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""4.0.0.0"")] public interface B { }", new[] { MscorlibRef }, assemblyName: "B").
EmitToImageReference
();
2672
var aRef = CreateEmptyCompilation(@"public interface A : B { }", new[] { MscorlibRef, b1Ref }, assemblyName: "A").
EmitToImageReference
();
2673
var dRef = CreateEmptyCompilation(@"public interface D : B { }", new[] { MscorlibRef, b2Ref }, assemblyName: "D").
EmitToImageReference
();
2703
var dRef = CreateCompilationWithMscorlib46("public interface D { }", assemblyName: "D").
EmitToImageReference
();
2719
var dRef = CreateCompilationWithMscorlib46("public interface D { }", assemblyName: "D").
EmitToImageReference
();
2742
var bRef = CreateCompilationWithMscorlib46("public interface D { }", assemblyName: "B").
EmitToImageReference
();
2768
var dRef = CreateCompilationWithMscorlib46("public interface D { }", assemblyName: "D").
EmitToImageReference
();
2795
var bRef = CreateCompilationWithMscorlib46("public interface B { }", assemblyName: "B").
EmitToImageReference
();
2796
var dRef = CreateCompilationWithMscorlib46("public interface D { }", assemblyName: "D").
EmitToImageReference
();
2798
var mRef = CreateCompilationWithMscorlib46("public interface M : B { }", new[] { bRef }, options: TestOptions.ReleaseModule.WithModuleName("M.netmodule")).
EmitToImageReference
();
2799
var nRef = CreateCompilationWithMscorlib46("public interface N : D { }", new[] { dRef }, options: TestOptions.ReleaseModule.WithModuleName("N.netmodule")).
EmitToImageReference
();
2801
var aRef = CreateCompilationWithMscorlib46("public interface A : D { }", new[] { dRef }, assemblyName: "A").
EmitToImageReference
();
2832
var b1Ref = CreateCompilationWithMscorlib46(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public class B { }", options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
2833
var b2Ref = CreateCompilationWithMscorlib46(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] public class B { }", options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
2834
var b3Ref = CreateCompilationWithMscorlib46(@"[assembly: System.Reflection.AssemblyVersion(""3.0.0.0"")] public class B { }", options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
2836
var aRef = CreateCompilationWithMscorlib46(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public class A : B { }", new[] { b1Ref }, options: s_signedDll, assemblyName: "A").
EmitToImageReference
();
2873
var b1Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface B { }", new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
2874
var b2Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] public interface B { }", new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
2876
var dRef = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface D : B { }", new[] { MscorlibRef, b2Ref }, options: s_signedDll, assemblyName: "D").
EmitToImageReference
();
2877
var eRef = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface E : B { }", new[] { MscorlibRef, b1Ref }, options: s_signedDll, assemblyName: "E").
EmitToImageReference
();
2886
s_signedDll.WithMetadataReferenceResolver(resolverA), assemblyName: "A").
EmitToImageReference
();
2939
var b1Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface B { }", references: new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
2940
var b2Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] public interface B { }", references: new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
2942
var dRef = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface D : B { }", new[] { MscorlibRef, b2Ref }, options: s_signedDll, assemblyName: "D").
EmitToImageReference
();
2943
var eRef = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface E : B { }", new[] { MscorlibRef, b1Ref }, options: s_signedDll, assemblyName: "E").
EmitToImageReference
();
2952
s_signedDll.WithMetadataReferenceResolver(resolverA), assemblyName: "A").
EmitToImageReference
();
2999
var b1Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface B { }", new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
3000
var b2Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] public interface B { }", new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
3002
var dRef = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface D : B { }", new[] { MscorlibRef, b2Ref }, options: s_signedDll, assemblyName: "D").
EmitToImageReference
();
3003
var eRef = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface E : B { }", new[] { MscorlibRef, b1Ref }, options: s_signedDll, assemblyName: "E").
EmitToImageReference
();
3006
s_signedDll, assemblyName: "A").
EmitToImageReference
();
3043
var b1Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface B { }", new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
3044
var b2Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] public interface B { }", new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
3045
var b3Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""3.0.0.0"")] public interface B { }", new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
3046
var b4Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""4.0.0.0"")] public interface B { }", new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
3048
var dRef = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface D : B { }", new[] { MscorlibRef, b2Ref }, options: s_signedDll, assemblyName: "D").
EmitToImageReference
();
3049
var eRef = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface E : B { }", new[] { MscorlibRef, b1Ref }, options: s_signedDll, assemblyName: "E").
EmitToImageReference
();
3052
s_signedDll, assemblyName: "A").
EmitToImageReference
();
3109
var b1Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface B { }", new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
3110
var b2Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] public interface B { }", new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
3111
var b3Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""3.0.0.0"")] public interface B { }", new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
3112
var b4Ref = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""4.0.0.0"")] public interface B { }", new[] { MscorlibRef }, options: s_signedDll, assemblyName: "B").
EmitToImageReference
();
3114
var dRef = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface D : B { }", new[] { MscorlibRef, b2Ref }, options: s_signedDll, assemblyName: "D").
EmitToImageReference
();
3115
var eRef = CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public interface E : B { }", new[] { MscorlibRef, b1Ref }, options: s_signedDll, assemblyName: "E").
EmitToImageReference
();
3118
s_signedDll, assemblyName: "A").
EmitToImageReference
();
3179
options: options, assemblyName: "A").
EmitToImageReference
();
3182
options: options, assemblyName: "B").
EmitToImageReference
();
3219
options: options, assemblyName: "A").
EmitToImageReference
();
3222
options: options, assemblyName: "B").
EmitToImageReference
();
Compilation\SemanticModelAPITests.cs (2)
1259
var ref1 = comp1.
EmitToImageReference
(aliases: ImmutableArray.Create("X"));
3841
var libRef = CreateCompilation("", assemblyName: "lib").
EmitToImageReference
(aliases: ImmutableArray.Create("Alias"));
Compilation\UsedAssembliesTests.cs (58)
70
verify<PEAssemblySymbol>(source2, comp1.
EmitToImageReference
());
397
verify<PEAssemblySymbol>(source2, comp1.
EmitToImageReference
());
431
verify<PEAssemblySymbol>(source2, comp1.
EmitToImageReference
());
456
var comp1ImageRef = comp1.
EmitToImageReference
();
508
var comp0ImageRef = comp0.
EmitToImageReference
();
522
var comp1ImageRef = comp1.
EmitToImageReference
();
578
var comp0ImageRef = comp0.
EmitToImageReference
();
592
var comp1Ref = comp1.
EmitToImageReference
();
605
var comp2ImageRef = comp2.
EmitToImageReference
();
627
comp2ImageRef = comp2.
EmitToImageReference
();
647
comp2ImageRef = comp2.
EmitToImageReference
();
1377
verify<PEAssemblySymbol>(source2, comp1.
EmitToImageReference
());
1632
var comp6ImageRef = comp6.
EmitToImageReference
();
1636
var comp7ImageRef = comp7.
EmitToImageReference
(embedInteropTypes: false);
1695
var comp1ImageRef = comp1.
EmitToImageReference
();
1706
var comp2ImageRef = comp2.
EmitToImageReference
();
1804
var comp1ImageRef = comp1.
EmitToImageReference
();
1887
var comp1ImageRef = comp1.
EmitToImageReference
();
1945
var comp6ImageRef = comp6.
EmitToImageReference
();
1949
var comp7ImageRef = comp7.
EmitToImageReference
(embedInteropTypes: false);
1970
var comp1ImageRef = comp1.
EmitToImageReference
();
2429
var comp0ImageRef = comp0.
EmitToImageReference
(embedInteropTypes: true);
2442
var comp1ImageRef = comp1.
EmitToImageReference
();
2462
var comp3ImageRef = comp3.
EmitToImageReference
(embedInteropTypes: false);
2497
var comp0ImageRef = comp0.
EmitToImageReference
(embedInteropTypes: true);
2509
var comp1ImageRef = comp1.
EmitToImageReference
();
2513
var comp3ImageRef = comp3.
EmitToImageReference
(embedInteropTypes: false);
2585
var comp0ImageRef = comp0.
EmitToImageReference
(embedInteropTypes: true);
2597
var comp1ImageRef = comp1.
EmitToImageReference
();
2601
var comp3ImageRef = comp3.
EmitToImageReference
(embedInteropTypes: false);
2673
var comp0ImageRef = comp0.
EmitToImageReference
(embedInteropTypes: true);
2685
var comp1ImageRef = comp1.
EmitToImageReference
();
2689
var comp3ImageRef = comp3.
EmitToImageReference
(embedInteropTypes: false);
2757
var comp0ImageRef = comp0.
EmitToImageReference
(embedInteropTypes: true);
2770
var comp1ImageRef = comp1.
EmitToImageReference
();
2774
var comp3ImageRef = comp3.
EmitToImageReference
(embedInteropTypes: false);
2846
var comp0ImageRef = comp0.
EmitToImageReference
(embedInteropTypes: true);
2858
var comp1ImageRef = comp1.
EmitToImageReference
();
2862
var comp3ImageRef = comp3.
EmitToImageReference
(embedInteropTypes: false);
2934
var comp0ImageRef = comp0.
EmitToImageReference
(embedInteropTypes: true);
2946
var comp1ImageRef = comp1.
EmitToImageReference
();
2950
var comp3ImageRef = comp3.
EmitToImageReference
(embedInteropTypes: false);
2998
var comp0ImageRef = comp0.
EmitToImageReference
(embedInteropTypes: true);
3037
var comp1ImageRef = comp1.
EmitToImageReference
();
3041
var comp3ImageRef = comp3.
EmitToImageReference
(embedInteropTypes: false);
3307
var comp0ImageRef = comp0.
EmitToImageReference
(embedInteropTypes: true);
3347
var comp1ImageRef = comp1.
EmitToImageReference
();
3351
var comp3ImageRef = comp3.
EmitToImageReference
(embedInteropTypes: false);
4923
var comp1ImageRef = comp1.
EmitToImageReference
();
5013
var comp1ImageRef = comp1.
EmitToImageReference
();
5068
var comp1ImageRef = comp1.
EmitToImageReference
();
5155
var comp1ImageRef = comp1.
EmitToImageReference
();
5197
var comp0ImageRef = comp0.
EmitToImageReference
();
5230
var comp1ImageRef = comp1.
EmitToImageReference
();
5413
var comp1ImageRef = comp1.
EmitToImageReference
();
5826
comp0Ref = comp0.
EmitToImageReference
();
5861
comp0Ref = comp0.
EmitToImageReference
();
5896
comp0Ref = comp0.
EmitToImageReference
();
CrossLanguageTests.cs (1)
31
var ref1 = vbcomp.
EmitToImageReference
(embedInteropTypes: true);
DocumentationComments\CrefTests.cs (2)
1865
var lib1Ref = CreateCompilation(lib1Source, assemblyName: "A").
EmitToImageReference
();
1866
var lib2Ref = CreateCompilation(lib2Source, assemblyName: "B").
EmitToImageReference
();
SymbolDisplay\SymbolDisplayTests.cs (3)
5489
var refA = compA.
EmitToImageReference
();
5668
var refA = compA.
EmitToImageReference
();
5693
var refA = compA.
EmitToImageReference
();
Symbols\AssemblyAndNamespaceTests.cs (1)
413
var libRef = libComp.
EmitToImageReference
(aliases: ImmutableArray.Create("myTask"));
Symbols\CheckedUserDefinedOperatorsTests.cs (6)
6608
var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.RegularPreview, references: new[] { compilation2.
EmitToImageReference
() });
6758
var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.RegularPreview, references: new[] { compilation2.
EmitToImageReference
() });
6807
var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.RegularPreview, references: new[] { compilation2.
EmitToImageReference
() });
6856
var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.RegularPreview, references: new[] { compilation2.
EmitToImageReference
() });
7007
var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.RegularPreview, references: new[] { compilation2.
EmitToImageReference
() });
7052
var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.RegularPreview, references: new[] { compilation2.
EmitToImageReference
() });
Symbols\CompilationCreationTests.cs (1)
2973
var ref1 = lib1.
EmitToImageReference
(); // NOTE: can't use a compilation reference for a module.
Symbols\CorLibrary\CorTypes.cs (4)
364
var comp1Ref = comp1.
EmitToImageReference
();
539
var comp1Ref = comp1.
EmitToImageReference
();
813
var comp1Ref = comp1.
EmitToImageReference
();
1007
var comp1Ref = comp1.
EmitToImageReference
();
Symbols\CovariantReturnTests.cs (19)
221
}, assemblyName: "mscorlib").
EmitToImageReference
(options: new CodeAnalysis.Emit.EmitOptions(runtimeMetadataVersion: "v4.1"));
225
}, assemblyName: "mscorlib").
EmitToImageReference
(options: new CodeAnalysis.Emit.EmitOptions(runtimeMetadataVersion: "v4.2"));
229
}, assemblyName: "mscorlib").
EmitToImageReference
(options: new CodeAnalysis.Emit.EmitOptions(runtimeMetadataVersion: "v5.0"));
233
}, assemblyName: "mscorlib").
EmitToImageReference
(options: new CodeAnalysis.Emit.EmitOptions(runtimeMetadataVersion: "v5.1"));
237
}, assemblyName: "mscorlib").
EmitToImageReference
(options: new CodeAnalysis.Emit.EmitOptions(runtimeMetadataVersion: "v4.9"));
482
var compAsImage = comp.
EmitToImageReference
();
1413
var baseMetadata = CreateCompilationWithCovariantReturns(s0).
EmitToImageReference
();
1475
var baseMetadata = CreateCompilationWithCovariantReturns(s0).
EmitToImageReference
();
1539
var baseMetadata = CreateCompilationWithCovariantReturns(s0).
EmitToImageReference
();
2578
var csRef = csComp.
EmitToImageReference
();
2811
var ref0 = CreateCompilationWithoutCovariantReturns(s0).
EmitToImageReference
();
2821
assemblyName: "ref1").
EmitToImageReference
();
2832
assemblyName: "ref1").
EmitToImageReference
();
2905
var ref0 = CreateCompilationWithoutCovariantReturns(s0).
EmitToImageReference
();
2912
var ref1a = CreateCompilationWithoutCovariantReturns(s1a, references: new[] { ref0 }, assemblyName: "ref1").
EmitToImageReference
();
2920
var ref1b = CreateCompilationWithCovariantReturns(s1b, references: new[] { ref0 }, assemblyName: "ref1").
EmitToImageReference
();
2972
var ref0 = CreateCompilationWithoutCovariantReturns(s0).
EmitToImageReference
();
2979
var ref1a = CreateCompilationWithoutCovariantReturns(s1a, references: new[] { ref0 }, assemblyName: "ref1").
EmitToImageReference
();
2987
var ref1b = CreateCompilationWithCovariantReturns(s1b, references: new[] { ref0 }, assemblyName: "ref1").
EmitToImageReference
();
Symbols\DefaultInterfaceImplementationTests.cs (183)
166
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
361
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
501
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
1676
foreach (var reference in new[] { compilation1.
EmitToImageReference
(), compilation1.ToMetadataReference() })
1742
foreach (var reference in new[] { compilation1.
EmitToImageReference
(), compilation1.ToMetadataReference() })
2203
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
2265
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
2334
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
2407
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
2480
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
2650
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
4405
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() },
4489
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() },
5965
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() },
6030
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugDll,
6619
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
7429
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() },
7496
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugDll,
9280
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
9470
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
9554
var compilation4 = CreateCompilation(source2, new[] { compilation2.
EmitToImageReference
() }, options: TestOptions.DebugExe,
9849
var compilation4 = CreateCompilation(source2, new[] { compilation2.
EmitToImageReference
() }, options: TestOptions.DebugExe,
9919
var compilation4 = CreateCompilation(source2, new[] { compilation2.
EmitToImageReference
() }, options: TestOptions.DebugExe,
9992
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
10938
var compilation4 = CreateCompilation(source2, new[] { compilation2.
EmitToImageReference
() }, options: TestOptions.DebugExe,
11755
foreach (var reference in new[] { compilation3.ToMetadataReference(), compilation3.
EmitToImageReference
() })
11905
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
12020
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
12143
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
12234
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
12296
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
12358
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
12635
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
12723
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
12811
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
14956
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
15135
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
15261
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
15683
var compilation4 = CreateCompilation(source2, new[] { compilation2.
EmitToImageReference
() }, options: TestOptions.DebugExe,
15762
var compilation4 = CreateCompilation(source2, new[] { compilation2.
EmitToImageReference
() }, options: TestOptions.DebugExe,
15862
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
17541
var compilation4 = CreateCompilation(source2, new[] { compilation2.
EmitToImageReference
() }, options: TestOptions.DebugExe,
18326
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
18492
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
19922
var compilation4 = CreateCompilation(source2, new[] { compilation2.
EmitToImageReference
() }, options: TestOptions.DebugExe,
20424
foreach (var reference in new[] { compilation3.ToMetadataReference(), compilation3.
EmitToImageReference
() })
28499
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
28640
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
28765
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
29192
var compilation4 = CreateCompilation(source2, new[] { compilation2.
EmitToImageReference
() }, options: TestOptions.DebugExe,
29274
var compilation4 = CreateCompilation(source2, new[] { compilation2.
EmitToImageReference
() }, options: TestOptions.DebugExe,
29374
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
30944
var compilation4 = CreateCompilation(source2, new[] { compilation2.
EmitToImageReference
() }, options: TestOptions.DebugExe,
31166
foreach (var reference in new[] { compilation3.ToMetadataReference(), compilation3.
EmitToImageReference
() })
32022
foreach (var reference in new[] { compilation3.ToMetadataReference(), compilation3.
EmitToImageReference
() })
32156
foreach (var reference in new[] { compilation3.ToMetadataReference(), compilation3.
EmitToImageReference
() })
32287
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe);
32547
foreach (var reference in new[] { compilation3.ToMetadataReference(), compilation3.
EmitToImageReference
() })
32991
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
34173
var compilation3 = CreateCompilation(source3, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
34210
var compilation6 = CreateCompilation(source2 + source3, new[] { compilation4.
EmitToImageReference
() }, options: TestOptions.DebugDll,
34311
var refs1 = new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() };
34499
var refs2 = new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() };
34703
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugDll,
34912
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
34997
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugDll,
35092
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugDll,
35190
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugDll,
35285
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugDll,
35467
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
35576
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
35689
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
35802
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
35908
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
36013
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
36111
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
36225
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
36402
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
36427
foreach (var reference in new[] { compilation4.ToMetadataReference(), compilation4.
EmitToImageReference
() })
36590
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
36615
foreach (var reference in new[] { compilation4.ToMetadataReference(), compilation4.
EmitToImageReference
() })
36778
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
36803
foreach (var reference in new[] { compilation4.ToMetadataReference(), compilation4.
EmitToImageReference
() })
37018
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: options,
38418
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
38444
foreach (var reference in new[] { compilation4.ToMetadataReference(), compilation4.
EmitToImageReference
() })
38770
var refs1 = new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() };
38836
var refs2 = new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() };
39015
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugDll,
39193
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
40050
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
41105
var compilation3 = CreateCompilation(source3, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
41141
var compilation6 = CreateCompilation(source2 + source3, new[] { compilation4.
EmitToImageReference
() }, options: TestOptions.DebugDll,
41267
var refs1 = new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() };
41498
var refs2 = new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() };
41688
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugDll,
41869
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
42037
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
42064
foreach (var reference in new[] { compilation4.ToMetadataReference(), compilation4.
EmitToImageReference
() })
42241
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
42268
foreach (var reference in new[] { compilation4.ToMetadataReference(), compilation4.
EmitToImageReference
() })
42445
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
42472
foreach (var reference in new[] { compilation4.ToMetadataReference(), compilation4.
EmitToImageReference
() })
43839
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
43976
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
44106
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
44218
var references = new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() };
45106
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
45259
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
45398
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
45590
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
45727
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugExe,
45900
(comp0:compilation0.
EmitToImageReference
(), comp1:compilation1.
EmitToImageReference
()) })
46032
foreach (var reference in new[] { compilation0.ToMetadataReference(), compilation0.
EmitToImageReference
() })
46158
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
46301
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
46596
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
47229
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
47321
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
47397
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
47527
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
47608
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
47682
MetadataReference metadataReference0 = compilation0.
EmitToImageReference
();
47714
MetadataReference metadataReference3 = compilation3.
EmitToImageReference
();
47743
MetadataReference metadataReference6 = compilation6.
EmitToImageReference
();
47815
MetadataReference metadataReference0 = compilation0.
EmitToImageReference
();
47847
MetadataReference metadataReference3 = compilation3.
EmitToImageReference
();
47876
MetadataReference metadataReference6 = compilation6.
EmitToImageReference
();
47943
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
48010
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
48086
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
48143
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
48210
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
48307
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
48377
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
48441
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
48520
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
48592
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
48664
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
48734
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
48897
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
48963
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
49070
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
49302
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
49542
MetadataReference metadataReference = compilation1.
EmitToImageReference
();
49658
foreach (var reference in new[] { compilation1.
EmitToImageReference
(), compilation1.ToMetadataReference() })
49774
foreach (var reference in new[] { compilation1.
EmitToImageReference
(), compilation1.ToMetadataReference() })
50575
foreach (var reference in new[] { piaCompilation.ToMetadataReference(embedInteropTypes: true), piaCompilation.
EmitToImageReference
(embedInteropTypes: true) })
50620
foreach (var reference in new[] { piaCompilation.ToMetadataReference(embedInteropTypes: true), piaCompilation.
EmitToImageReference
(embedInteropTypes: true) })
50684
var attributesRef = attributes.
EmitToImageReference
();
50750
var pia2Reference = pia2Compilation.
EmitToImageReference
();
50755
foreach (var reference2 in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
50805
foreach (var reference in new[] { piaCompilation.ToMetadataReference(embedInteropTypes: true), piaCompilation.
EmitToImageReference
(embedInteropTypes: true) })
51068
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
51235
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
51379
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
51516
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
51663
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
51803
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
51909
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
52508
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
52704
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
52865
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
53032
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
53204
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
53366
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
53501
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
54198
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
57486
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
57662
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
57816
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
57971
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
58130
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
58279
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
58403
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
59250
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
66749
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
66929
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
68189
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
68699
var compilation3 = CreateCompilation(source2, new[] { compilation1.
EmitToImageReference
() }, options: TestOptions.DebugDll,
68864
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
68949
foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.
EmitToImageReference
() })
Symbols\DestructorTests.cs (1)
525
var vbRef = CreateVisualBasicCompilation("VB", vb).
EmitToImageReference
();
Symbols\EnumTests.cs (4)
321
var refA = comp.
EmitToImageReference
();
333
var refB = comp.
EmitToImageReference
();
365
var refA = comp.
EmitToImageReference
();
377
var refB = comp.
EmitToImageReference
();
Symbols\ExtendedPartialMethodsTests.cs (7)
2090
verify(comp1.
EmitToImageReference
());
2236
verify(comp1.
EmitToImageReference
());
2279
verify(comp1.
EmitToImageReference
());
2322
verify(comp1.
EmitToImageReference
());
2363
verify(comp1.
EmitToImageReference
());
2484
verify(comp1.
EmitToImageReference
());
2592
var vbComp = CreateVisualBasicCompilation(vb, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Standard).Add(comp.
EmitToImageReference
()));
Symbols\GenericConstraintTests.cs (5)
291
var comp2 = CreateCompilation(source, new MetadataReference[] { comp1.
EmitToImageReference
() });
7297
new[] { metadataComp.
EmitToImageReference
() },
7357
var metadataComp = CreateCompilation(code, new[] { remappedComp11.
EmitToImageReference
() }, assemblyName: "intermediate", targetFramework: TargetFramework.NetStandard20);
7364
new[] { metadataComp.
EmitToImageReference
(), remappedComp12.
EmitToImageReference
() },
Symbols\InterfaceImplementationTests.cs (1)
2755
var comp1 = CreateCompilation("", references: new[] { comp0.
EmitToImageReference
() });
Symbols\Metadata\MetadataMemberTests.cs (4)
629
var comp2 = CreateCompilation("", new[] { comp1.
EmitToImageReference
() });
670
var comp2 = CreateCompilation("", new[] { comp1.
EmitToImageReference
() });
734
var compilation = CreateCompilation("", options: options, references: new[] { compilation0.
EmitToImageReference
() });
796
var compilation = CreateCompilation("", options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.Internal), references: new[] { compilation0.
EmitToImageReference
() });
Symbols\Metadata\MetadataTypeTests.cs (1)
283
var compilation2 = CreateEmptyCompilation(source2, new MetadataReference[] { Net40.References.mscorlib, Net40.References.SystemCore, compilation1.
EmitToImageReference
() },
Symbols\Metadata\PE\LoadingEvents.cs (1)
467
var reference = CreateCompilation(source).
EmitToImageReference
();
Symbols\Metadata\PE\NoPia.cs (2)
1385
var referencePIAImage = compilationPIA.
EmitToImageReference
(embedInteropTypes: true);
1391
var referenceBaseImage = compilationBase.
EmitToImageReference
();
Symbols\Metadata\PE\TypeForwarders.cs (13)
1619
var modRef1 = modCompilation.
EmitToImageReference
();
1835
var cB_ImageRef = cB.
EmitToImageReference
();
1843
var cC_v1_ImageRef = cC_v1.
EmitToImageReference
();
1849
var cA_v2_ImageRef = cA_v2.
EmitToImageReference
();
1855
var cD_ImageRef = cD.
EmitToImageReference
();
1919
var refA1 = compA1.
EmitToImageReference
(aliases: ImmutableArray.Create("A"));
1923
var refB1 = compB1.
EmitToImageReference
(aliases: ImmutableArray.Create("B"));
1946
var refBImpl = compBImpl.
EmitToImageReference
();
1954
comp = CreateCompilation(sourceProgram, references: new[] { refA1, compB2.
EmitToImageReference
(aliases: ImmutableArray.Create("B")), refBImpl });
1983
var refA1 = compA1.
EmitToImageReference
(aliases: ImmutableArray.Create("A"));
1987
var refB1 = compB1.
EmitToImageReference
(aliases: ImmutableArray.Create("B"));
2010
var refBImpl = compBImpl.
EmitToImageReference
();
2018
comp = CreateCompilation(sourceProgram, references: new[] { refA1, compB2.
EmitToImageReference
(aliases: ImmutableArray.Create("B")), refBImpl });
Symbols\MissingSpecialMember.cs (2)
492
var publicLibRef = CreateEmptyCompilation(string.Format(libSourceTemplate, "public"), new[] { corlibRef }, parseOptions: parseOptions).
EmitToImageReference
();
493
var internalLibRef = CreateEmptyCompilation(string.Format(libSourceTemplate, "internal"), new[] { corlibRef }, parseOptions: parseOptions).
EmitToImageReference
();
Symbols\ModuleInitializers\ModuleInitializersTests.cs (2)
832
var ref1 = comp1.
EmitToImageReference
();
849
var ref2 = comp2.
EmitToImageReference
();
Symbols\OverriddenOrHiddenMembersTests.cs (16)
2900
var ref1 = comp1.
EmitToImageReference
();
2903
var ref2 = comp2.
EmitToImageReference
();
2948
var ref1 = comp1.
EmitToImageReference
();
2951
var ref2 = comp2.
EmitToImageReference
();
2996
var ref1 = comp1.
EmitToImageReference
();
2999
var ref2 = comp2.
EmitToImageReference
();
3043
var ref1 = comp1.
EmitToImageReference
();
3046
var ref2 = comp2.
EmitToImageReference
();
3090
var ref1 = comp1.
EmitToImageReference
();
3093
var ref2 = comp2.
EmitToImageReference
();
3137
var ref1 = comp1.
EmitToImageReference
();
3140
var ref2 = comp2.
EmitToImageReference
();
3209
var ref1 = comp1.
EmitToImageReference
();
3212
var ref2 = comp2.
EmitToImageReference
();
3264
var ref1 = comp1.
EmitToImageReference
();
3267
var ref2 = comp2.
EmitToImageReference
();
Symbols\PartialPropertiesTests.cs (2)
1142
var reference = comp.
EmitToImageReference
();
1189
var reference = comp.
EmitToImageReference
();
Symbols\PEParameterSymbolTests.cs (1)
76
").
EmitToImageReference
();
Symbols\RelaxedShiftOperatorTests.cs (1)
59
var compilation3 = CreateCompilation(source1, options: TestOptions.DebugExe, references: new[] { compilation0.
EmitToImageReference
() },
Symbols\RequiredMembersTests.cs (37)
511
comp = CreateCompilation(derived, references: new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
() });
553
MetadataReference baseReference = useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
();
557
comp = CreateCompilation(derivedDerived, new[] { baseReference, useMetadataReference ? derivedComp.ToMetadataReference() : derivedComp.
EmitToImageReference
() });
599
comp = CreateCompilation(derived, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
() });
650
var baseReference = useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
();
655
comp = CreateCompilation(derivedDerived, new[] { baseReference, useMetadataReference ? derivedComp.ToMetadataReference() : derivedComp.
EmitToImageReference
() });
729
var baseReference = useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
();
802
comp = CreateCompilation("#pragma warning disable CS0649 // Never assigned" + derived, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
() });
1608
comp = CreateCompilation(creation, references: new[] { useMetadataReference ? cComp.ToMetadataReference() : cComp.
EmitToImageReference
() });
1635
comp = CreateCompilation(creation, references: new[] { useMetadataReference ? cComp.ToMetadataReference() : cComp.
EmitToImageReference
() });
1678
comp = CreateCompilation(creation, references: new[] { useMetadataReference ? cComp.ToMetadataReference() : cComp.
EmitToImageReference
() });
1703
comp = CreateCompilation(creation, references: new[] { useMetadataReference ? cComp.ToMetadataReference() : cComp.
EmitToImageReference
() });
2026
comp = CreateCompilation(code, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
() });
2063
var baseRef = useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
();
2068
comp = CreateCompilation(code, new[] { baseRef, useMetadataReference ? derivedComp.ToMetadataReference() : derivedComp.
EmitToImageReference
() });
2120
comp = CreateCompilation(code, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
() });
2153
comp = CreateCompilation(code, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
() });
2184
comp = CreateCompilation(code, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
() });
2352
comp = CreateCompilation(code, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
() });
2387
comp = CreateCompilation(code, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
() });
2426
comp = CreateCompilation(code, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
() });
2458
comp = CreateCompilation(code, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
() });
3239
var comp = CreateCompilation(c, new[] { il, originalComp.
EmitToImageReference
() });
3284
var comp = CreateCompilation(c, new[] { il, originalComp.
EmitToImageReference
() });
3328
var comp = CreateCompilation(c, new[] { il, originalComp.
EmitToImageReference
() });
3369
var comp = CreateCompilation(c, new[] { il, originalComp.
EmitToImageReference
() });
3413
var comp = CreateCompilation(c, new[] { il, originalComp.
EmitToImageReference
() });
4660
comp = CreateCompilation(derived, new[] { baseComp.
EmitToImageReference
() });
4705
comp = CreateCompilation(derived, new[] { baseComp.
EmitToImageReference
() });
4750
comp = CreateCompilation(derived, new[] { baseComp.
EmitToImageReference
() });
4794
comp = CreateCompilation(derived, new[] { baseComp.
EmitToImageReference
() });
4840
comp = CreateCompilation(derived, new[] { baseComp.
EmitToImageReference
() });
5216
comp = CreateCompilation(derived, new[] { baseComp.
EmitToImageReference
() });
5362
comp = CreateCompilation(derived, new[] { baseComp.
EmitToImageReference
() });
5678
var comp = CreateCompilationWithIL(code, ilSource: il, references: new[] { attrComp.
EmitToImageReference
() });
5892
comp = CreateCompilation(code, references: new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
() });
5971
comp = CreateCompilation(code, references: new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.
EmitToImageReference
() });
Symbols\Retargeting\NoPia.cs (10)
1537
references: new MetadataReference[] { pia.
EmitToImageReference
(embedInteropTypes: true) });
1591
references: new MetadataReference[] { pia.
EmitToImageReference
(embedInteropTypes: true) });
1644
references: new MetadataReference[] { pia.
EmitToImageReference
(embedInteropTypes: true) });
1686
references: new MetadataReference[] { pia.
EmitToImageReference
(embedInteropTypes: true) });
1741
references: new MetadataReference[] { pia.
EmitToImageReference
(embedInteropTypes: true) });
1809
references: new MetadataReference[] { pia.
EmitToImageReference
(embedInteropTypes: true), lib.
EmitToImageReference
() });
2603
references: new[] { module1.
EmitToImageReference
() });
2663
foreach (MetadataReference piaRef in new[] { piaCompilation.
EmitToImageReference
(), piaCompilation.ToMetadataReference() })
2667
foreach (MetadataReference consumer1Ref in new[] { compilation1.
EmitToImageReference
(), compilation1.ToMetadataReference() })
Symbols\Source\BaseClassTests.cs (1)
1894
var metadataRef = CreateCompilation(source).
EmitToImageReference
(embedInteropTypes: true);
Symbols\Source\ClsComplianceTests.cs (23)
495
var lib1 = CreateCompilation(libSource1, assemblyName: "lib1", parseOptions: TestOptions.Regular11).
EmitToImageReference
();
496
var lib2 = CreateCompilation(libSource2, assemblyName: "lib2", parseOptions: TestOptions.Regular11).
EmitToImageReference
();
497
var lib3 = CreateCompilation(libSource3, assemblyName: "lib3", parseOptions: TestOptions.Regular11).
EmitToImageReference
();
561
var lib1 = CreateCompilation(libSource1, assemblyName: "lib1", options: TestOptions.UnsafeDebugDll).
EmitToImageReference
();
562
var lib2 = CreateCompilation(libSource2, assemblyName: "lib2", options: TestOptions.UnsafeDebugDll).
EmitToImageReference
();
563
var lib3 = CreateCompilation(libSource3, assemblyName: "lib3", options: TestOptions.UnsafeDebugDll).
EmitToImageReference
();
582
lib1 = CreateCompilation(libSource1, assemblyName: "lib1").
EmitToImageReference
();
583
lib2 = CreateCompilation(libSource2, assemblyName: "lib2").
EmitToImageReference
();
584
lib3 = CreateCompilation(libSource3, assemblyName: "lib3").
EmitToImageReference
();
643
var libCompliant = CreateCompilationWithMscorlib46(libCompliant_cs).
EmitToImageReference
();
651
var libNotCompliant = CreateCompilationWithMscorlib46(libNotCompliant_cs).
EmitToImageReference
();
2366
var trueModuleRef = CreateCompilation("[assembly:System.CLSCompliant(true)][module:System.CLSCompliant(true)]", options: TestOptions.ReleaseModule, assemblyName: "true").
EmitToImageReference
();
2367
var falseModuleRef = CreateCompilation("[assembly:System.CLSCompliant(false)][module:System.CLSCompliant(false)]", options: TestOptions.ReleaseModule, assemblyName: "false").
EmitToImageReference
();
2368
var noneModuleRef = CreateCompilation("", options: TestOptions.ReleaseModule, assemblyName: "none").
EmitToImageReference
();
2401
var trueModuleRef = CreateCompilation("[assembly:System.CLSCompliant(true)]", options: TestOptions.ReleaseModule, assemblyName: "true").
EmitToImageReference
();
2402
var falseModuleRef = CreateCompilation("[assembly:System.CLSCompliant(false)]", options: TestOptions.ReleaseModule, assemblyName: "false").
EmitToImageReference
();
2403
var noneModuleRef = CreateCompilation("", options: TestOptions.ReleaseModule, assemblyName: "none").
EmitToImageReference
();
2434
var trueModuleRef = CreateCompilation("[assembly:System.CLSCompliant(true)][module:System.CLSCompliant(true)]", options: TestOptions.ReleaseModule, assemblyName: "true").
EmitToImageReference
();
2435
var falseModuleRef = CreateCompilation("[assembly:System.CLSCompliant(false)][module:System.CLSCompliant(false)]", options: TestOptions.ReleaseModule, assemblyName: "false").
EmitToImageReference
();
3459
var libRef = CreateCompilation(libSource).
EmitToImageReference
();
3646
var libRef = CreateCompilation(libSource).
EmitToImageReference
();
3756
var libRef = CreateCompilation(libSource, assemblyName: "lib").
EmitToImageReference
();
3879
var comp2 = CreateCompilation(source2, new[] { comp1.
EmitToImageReference
() }, TestOptions.ReleaseDll.WithConcurrentBuild(false));
Symbols\Source\EventTests.cs (5)
416
var libAssemblyRef = libComp.
EmitToImageReference
();
462
var libAssemblyRef = libComp.
EmitToImageReference
();
536
var libAssemblyRef = libComp.
EmitToImageReference
();
595
var libAssemblyRef = libComp.
EmitToImageReference
();
627
var libAssemblyRef = libComp.
EmitToImageReference
();
Symbols\Source\ExternAliasTests.cs (5)
38
s_goo1 = comp.
EmitToImageReference
(aliases: ImmutableArray.Create("Bar"));
63
s_goo2 = comp.
EmitToImageReference
(aliases: ImmutableArray.Create("Bar"));
317
var goo1Alias = comp.
EmitToImageReference
(aliases: ImmutableArray.Create("global"));
396
var ref1 = comp1.
EmitToImageReference
(aliases: ImmutableArray.Create("X"));
399
var ref2 = comp2.
EmitToImageReference
(aliases: ImmutableArray.Create("X"));
Symbols\Source\FileModifierTests.cs (9)
4153
var comp2 = CreateCompilation("", references: new[] { comp.
EmitToImageReference
() });
4184
var comp2 = CreateCompilation("", references: new[] { comp.
EmitToImageReference
() });
4249
var comp2 = CreateCompilation("", references: new[] { comp.
EmitToImageReference
() });
4277
firstIsMetadataReference ? ref1.ToMetadataReference() : ref1.
EmitToImageReference
(),
4278
secondIsMetadataReference ? ref2.ToMetadataReference() : ref2.
EmitToImageReference
()
4428
var referencingImageComp = CreateCompilation("", new[] { comp.
EmitToImageReference
() });
4505
var reference = useMetadataReference ? comp0.ToMetadataReference() : comp0.
EmitToImageReference
();
5110
var comp2 = CreateCompilation(new[] { (source2, "File2.cs") }, references: new[] { useMetadataReference ? comp1.ToMetadataReference() : comp1.
EmitToImageReference
() });
5116
comp1 = CreateCompilation(new[] { (source1, "File1.cs") }, references: new[] { useMetadataReference ? comp2.ToMetadataReference() : comp2.
EmitToImageReference
() });
Symbols\Source\NullablePublicAPITests.cs (4)
463
var comp1Emit = comp1.
EmitToImageReference
();
468
var comp2Emit = comp2.
EmitToImageReference
();
1049
var comp1Emit = comp1.
EmitToImageReference
();
1054
var comp2Emit = comp2.
EmitToImageReference
();
Symbols\Source\RecordTests.cs (1)
1355
emitReference ? comp.
EmitToImageReference
() : comp.ToMetadataReference()
Symbols\StaticAbstractMembersInInterfacesTests.cs (49)
6387
references: new[] { compilation1.
EmitToImageReference
() });
6488
references: new[] { compilation1.
EmitToImageReference
() });
6617
references: new[] { compilation1.
EmitToImageReference
() });
6753
references: new[] { compilation1.
EmitToImageReference
() });
6882
references: new[] { compilation1.
EmitToImageReference
() });
7011
references: new[] { compilation1.
EmitToImageReference
() });
16190
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
16671
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
16759
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
16851
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
16933
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
17015
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
17086
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
17160
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
17247
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
17346
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
17452
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
19918
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
19992
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
20075
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
20155
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
21283
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
21343
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
21446
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
21566
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
21689
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
21798
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
21900
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
23208
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
24769
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
24884
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
25011
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
25082
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
25895
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
27434
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
27549
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
27677
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
27748
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
28882
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
29507
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
29624
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
29730
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
31714
references: new[] { compilation0.
EmitToImageReference
() });
33094
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
33161
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
33228
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
33295
foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.
EmitToImageReference
() })
33665
var compilation3 = CreateCompilation(source2, options: TestOptions.DebugDll, references: new[] { compilation1.
EmitToImageReference
() },
33722
var compilation3 = CreateCompilation(source2, options: TestOptions.DebugDll, references: new[] { compilation1.
EmitToImageReference
() },
Symbols\SymbolDistinguisherTests.cs (19)
33
var libRef = CreateCompilation(tree, assemblyName: "Metadata").
EmitToImageReference
();
158
var libRef = CreateCompilation(source, assemblyName: "Metadata").
EmitToImageReference
();
182
var libRef = CreateCompilation(tree, assemblyName: "Metadata").
EmitToImageReference
();
208
var libRef = CreateCompilation(tree, assemblyName: "Metadata").
EmitToImageReference
();
233
var libRef = CreateCompilation(tree, assemblyName: "Metadata", options: TestOptions.UnsafeReleaseDll).
EmitToImageReference
();
258
var libRef = CreateCompilation(tree, assemblyName: "Metadata").
EmitToImageReference
();
280
var libRef = CreateCompilation(tree, assemblyName: "Metadata").
EmitToImageReference
();
297
var libRef = CreateCompilation("public class dynamic { }", assemblyName: "Metadata").
EmitToImageReference
();
350
var libRef = CreateCompilation(libSource, assemblyName: "Metadata").
EmitToImageReference
();
384
var libRef = CreateCompilation(libSource, assemblyName: "Metadata").
EmitToImageReference
();
418
var libRef = CreateCompilation(libSource, assemblyName: "Metadata").
EmitToImageReference
();
450
var libRef = CreateCompilation(libSource, assemblyName: "Metadata").
EmitToImageReference
();
482
var libRef = CreateCompilation(libSource, assemblyName: "Metadata").
EmitToImageReference
();
511
var libRef = CreateCompilation(libSource, assemblyName: "Metadata").
EmitToImageReference
();
546
var libRef = CreateCompilation(libSource, assemblyName: "Metadata").
EmitToImageReference
();
611
var libRef = CreateCompilation(libSource, assemblyName: "Metadata").
EmitToImageReference
();
648
var libRef = CreateCompilation(libSource, assemblyName: "Metadata").
EmitToImageReference
();
679
var libRef = CreateCompilation(libSource, assemblyName: "Metadata").
EmitToImageReference
();
740
var ref1 = compilation1.
EmitToImageReference
();
Symbols\SymbolErrorTests.cs (23)
6911
var mod3Ref = CreateCompilation(mod3Source, options: TestOptions.ReleaseModule, assemblyName: "ErrTestMod03").
EmitToImageReference
();
6996
var mod3Ref = CreateCompilation(mod3Source, options: TestOptions.ReleaseModule, assemblyName: "ErrTestMod03").
EmitToImageReference
();
7067
var ModuleA01Ref = CreateCompilation(ModuleA01, options: TestOptions.ReleaseModule, assemblyName: "ModuleA01").
EmitToImageReference
();
7075
var ModuleB01Ref = CreateCompilation(ModuleB01, options: TestOptions.ReleaseModule, assemblyName: "ModuleB01").
EmitToImageReference
();
7229
var moduleRef2 = CreateCompilation(mod2Source, options: TestOptions.ReleaseModule, assemblyName: "mod_1_2").
EmitToImageReference
();
7274
EmitToImageReference
();
7286
EmitToImageReference
();
7292
EmitToImageReference
();
7298
EmitToImageReference
();
7304
EmitToImageReference
();
16438
var ref1 = vbcomp.
EmitToImageReference
(embedInteropTypes: true);
20404
var comp4 = CreateCompilation(source3, new[] { comp2.
EmitToImageReference
() }, options: TestOptions.ReleaseDll);
20683
var referenceC = CreateCompilation(codeC, assemblyName: "C").
EmitToImageReference
();
20698
var referenceB = CreateCompilation(codeB, references: new MetadataReference[] { referenceC }, assemblyName: "B").
EmitToImageReference
();
20747
var referenceC = CreateCompilation(codeC, assemblyName: "C").
EmitToImageReference
();
20762
var referenceB = CreateCompilation(codeB, references: new MetadataReference[] { referenceC }, assemblyName: "B").
EmitToImageReference
();
20810
var referenceD = CreateCompilation(codeD, assemblyName: "D").
EmitToImageReference
();
20877
var dReference = CreateCompilation(dCode, assemblyName: "D").
EmitToImageReference
();
21011
var referenceC = CreateCompilation(codeC, assemblyName: "C").
EmitToImageReference
();
21026
var referenceB = CreateCompilation(codeB, references: new MetadataReference[] { referenceC }, assemblyName: "B").
EmitToImageReference
();
21053
var referenceE = CreateCompilation(codeC, assemblyName: "E").
EmitToImageReference
();
21576
var comp2Ref = comp2.
EmitToImageReference
();
21671
var comp2Ref = comp2.
EmitToImageReference
();
Symbols\TypeTests.cs (1)
808
assemblyName: "System.Console").
EmitToImageReference
();
Symbols\UnsignedRightShiftTests.cs (7)
1999
var compilation3 = CreateCompilation(source1, options: TestOptions.DebugExe, references: new[] { compilation0.
EmitToImageReference
() },
2251
var compilation3 = CreateCompilation(source1, options: TestOptions.DebugExe, references: new[] { compilation0.
EmitToImageReference
() },
2288
var compilation3 = CreateCompilation(source1, options: TestOptions.DebugDll, references: new[] { compilation0.
EmitToImageReference
() },
3443
foreach (var reference in new[] { compilation0.ToMetadataReference(), compilation0.
EmitToImageReference
() })
3495
foreach (var reference in new[] { compilation0.ToMetadataReference(), compilation0.
EmitToImageReference
() })
3547
foreach (var reference in new[] { compilation0.ToMetadataReference(), compilation0.
EmitToImageReference
() })
3599
foreach (var reference in new[] { compilation0.ToMetadataReference(), compilation0.
EmitToImageReference
() })
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\FieldAndValueKeywordTests.cs (1)
1210
var refA = comp.
EmitToImageReference
();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (8)
CSharpTestBase.cs (8)
663
CreateCompilation(RefSafetyRulesAttributeDefinition).
EmitToImageReference
();
2267
references: new[] { reference.
EmitToImageReference
() },
2285
references: new List<MetadataReference>() { NetFramework.mscorlib, NetFramework.SystemCore, NetFramework.MicrosoftCSharp, reference.
EmitToImageReference
() },
2312
references: new List<MetadataReference>() { reference.
EmitToImageReference
() },
2323
references: new List<MetadataReference>() { reference.
EmitToImageReference
() },
2334
references: new List<MetadataReference>() { reference.
EmitToImageReference
() },
2351
references: new List<MetadataReference>() { reference.
EmitToImageReference
() },
2369
references: new List<MetadataReference>() { reference.
EmitToImageReference
() },
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Metadata\WinMdEventTests.cs (1)
242
assemblyName: "EventLibrary").
EmitToImageReference
();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (1)
51
references: [TestBase.MscorlibRef]).
EmitToImageReference
();
Microsoft.CodeAnalysis.Test.Utilities (3)
CommonTestBase.cs (2)
490
references.Add(referencedCompilation.
EmitToImageReference
());
497
return useCompilationReference ? comp.ToMetadataReference() : comp.
EmitToImageReference
();
Mocks\Silverlight.cs (1)
99
references: [mscorlibCompilation.
EmitToImageReference
()],
Microsoft.CodeAnalysis.UnitTests (1)
Diagnostics\SuppressMessageAttributeCompilerTests.cs (1)
61
references: new[] { TestBase.MscorlibRef }).
EmitToImageReference
();
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (41)
Attributes\AssemblyAttributes.vb (23)
550
</compilation>, {compilation.
EmitToImageReference
()}, TestOptions.ReleaseDll)
581
</compilation>, {compilation.
EmitToImageReference
()}, TestOptions.ReleaseDll)
614
</compilation>, {compilation.
EmitToImageReference
()}, TestOptions.ReleaseDll)
663
</compilation>, {compilation.
EmitToImageReference
()}, TestOptions.ReleaseDll)
1017
</compilation>, options:=TestOptions.ReleaseDll, references:={hash_module_Comp.
EmitToImageReference
()})
1346
Dim modRef = DirectCast(consoleappCompilation.
EmitToImageReference
(), MetadataImageReference)
1457
Dim modRef = DirectCast(consoleappCompilation.
EmitToImageReference
(), MetadataImageReference)
1641
Dim netmodule2Ref = comp.
EmitToImageReference
()
1927
Dim assembly = CreateCompilationWithMscorlib40(assemblySrc, references:={[module].
EmitToImageReference
()})
2077
{compMod1.
EmitToImageReference
(), compMod2.
EmitToImageReference
()},
2127
{compMod1.
EmitToImageReference
(), compMod2.
EmitToImageReference
()},
2175
{compMod1.
EmitToImageReference
(), compMod2.
EmitToImageReference
()},
2224
{compMod1.
EmitToImageReference
(), compMod2.
EmitToImageReference
()},
2259
Dim attributeDefinition1 = CreateCompilation(attribute1, options:=TestOptions.ReleaseDll).
EmitToImageReference
()
2268
Dim moduleWithAttribute = CreateCompilation([module], references:={attributeDefinition1}, options:=TestOptions.ReleaseModule).
EmitToImageReference
()
2301
Dim attributeDefinition2 = CreateCompilation(attribute2, options:=TestOptions.ReleaseDll).
EmitToImageReference
()
2323
Dim c1Definition = CreateCompilation(c1, options:=TestOptions.ReleaseDll).
EmitToImageReference
()
2339
Dim module1WithAttribute = CreateCompilation(module1, references:={c1Definition}, options:=TestOptions.ReleaseModule).
EmitToImageReference
()
2374
Dim module2WithAttribute = CreateCompilation(module2, references:={c1Definition}, options:=TestOptions.ReleaseModule).
EmitToImageReference
()
Attributes\InternalsVisibleToAndStrongNameTests.vb (8)
675
Dim reference = c1.
EmitToImageReference
()
711
Dim reference = c1.
EmitToImageReference
()
1163
Dim comp3 = CreateCompilation(src, references:={comp.
EmitToImageReference
()},
1221
{other.
EmitToImageReference
()},
2483
comp = CreateCompilation(source, {other.
EmitToImageReference
()})
2521
comp = CreateCompilation(source, {other.
EmitToImageReference
()})
2568
Dim imageReference As MetadataReference = other.
EmitToImageReference
()
2685
Dim imageReference As MetadataReference = other.
EmitToImageReference
()
Emit\CompilationEmitTests.vb (7)
1506
Dim metadataImage = comp.
EmitToImageReference
(emitMetadataOnly)
1540
Dim refImage = comp.
EmitToImageReference
(emitRefOnly)
1608
Dim metadataImage = comp.
EmitToImageReference
(emitMetadataOnly)
1627
Dim refImage = comp.
EmitToImageReference
(emitRefOnly)
1687
Dim metadataImage = comp.
EmitToImageReference
(emitMetadataOnly)
1707
Dim refImage = comp.
EmitToImageReference
(emitRefOnly)
1739
Dim refImage = comp.
EmitToImageReference
(emitRefOnly)
Emit\EditAndContinue\AssemblyReferencesTests.vb (3)
254
Dim compilation0 = CreateCompilationWithMscorlib40({src0}, {lib0.
EmitToImageReference
()}, assemblyName:="C", options:=TestOptions.DebugDll)
255
Dim compilation1 = compilation0.WithSource(src1).WithReferences({MscorlibRef, lib1.
EmitToImageReference
()})
256
Dim compilation2 = compilation1.WithSource(src2).WithReferences({MscorlibRef, lib2.
EmitToImageReference
()})
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (47)
Compilation\CompilationAPITests.vb (16)
875
</compilation>, references:={netModule1.
EmitToImageReference
()}, options:=TestOptions.ReleaseModule)
887
</compilation>, references:={netModule2.
EmitToImageReference
()})
899
</compilation>, references:={netModule1.
EmitToImageReference
(), netModule2.
EmitToImageReference
()})
927
</compilation>, references:={netModule1.
EmitToImageReference
()}, options:=TestOptions.ReleaseModule)
939
</compilation>, references:={netModule1.
EmitToImageReference
()}, options:=TestOptions.ReleaseModule)
952
</compilation>, references:={netModule2.
EmitToImageReference
(), netModule3.
EmitToImageReference
()})
1011
</compilation>, references:={netModule1.
EmitToImageReference
()}, options:=TestOptions.ReleaseModule)
1023
</compilation>, references:={netModule1.
EmitToImageReference
(), netModule2.
EmitToImageReference
()})
2551
</compilation>, {moduleComp.
EmitToImageReference
()})
2753
Dim corlibWithoutValueTupleRef = CreateEmptyCompilation(corlib, assemblyName:="corlibWithoutValueTupleRef").
EmitToImageReference
()
2754
Dim corlibWithValueTupleRef = CreateEmptyCompilation(corlib + tuple, assemblyName:="corlibWithValueTupleRef").
EmitToImageReference
()
2756
Dim libWithIsExternalInitRef = CreateEmptyCompilation(tuple, references:={corlibWithoutValueTupleRef}, assemblyName:="libWithIsExternalInit").
EmitToImageReference
()
2757
Dim libWithIsExternalInitRef2 = CreateEmptyCompilation(tuple, references:={corlibWithoutValueTupleRef}, assemblyName:="libWithIsExternalInit2").
EmitToImageReference
()
Semantics\NativeIntegerTests.vb (1)
22
Dim ref0 = comp.
EmitToImageReference
()
Semantics\RequiredMembersTests.vb (30)
28
Dim csharpReference = CreateCSharpCompilationWithRequiredMembers(csharp).
EmitToImageReference
()
249
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
272
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
293
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
309
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
351
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
380
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
403
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
419
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
601
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
621
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
641
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
657
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
673
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
693
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
714
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
736
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
1328
End Module", {cComp.
EmitToImageReference
()})
1360
End Module", {cComp.
EmitToImageReference
()})
1391
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
1408
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
1416
Dim vbComp = CreateCompilation("", {cComp.
EmitToImageReference
()})
1447
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
1601
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
1623
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
1652
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
1674
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
1712
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
1744
Dim comp = CreateCompilation(vbCode, {cComp.
EmitToImageReference
()})
2470
End Module", {csharpComp.
EmitToImageReference
()}, targetFramework:=TargetFramework.Net70)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (4)
CompilationAPITests.vb (1)
115
Return If(useMetadataReference, referenceComp.ToMetadataReference(), referenceComp.
EmitToImageReference
())
UsedAssembliesTests.vb (3)
427
Dim comp2ImageRef = comp2.
EmitToImageReference
()
449
comp2ImageRef = comp2.
EmitToImageReference
()
469
comp2ImageRef = comp2.
EmitToImageReference
()