Base:
method
ToMetadataReference
Microsoft.CodeAnalysis.Compilation.ToMetadataReference(System.Collections.Immutable.ImmutableArray<System.String>, System.Boolean)
1375 references to ToMetadataReference
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (4)
CommandLineIVTTests.cs (4)
39
}, additionalReferences: new[] { comp1.
ToMetadataReference
() });
116
}, additionalReferences: new[] { comp1.
ToMetadataReference
() });
195
}, additionalReferences: new[] { comp1.
ToMetadataReference
() });
280
}, additionalReferences: new[] { comp1.
ToMetadataReference
() });
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (164)
CodeGen\CodeGenAsyncIteratorTests.cs (4)
8635
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: TargetFramework.Net80);
8678
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: TargetFramework.Net80);
10499
", assemblyName: "libS1", targetFramework: TargetFramework.Net80).
ToMetadataReference
();
10506
", references: [missingLibS1], assemblyName: "libS2", targetFramework: TargetFramework.Net80).
ToMetadataReference
();
CodeGen\CodeGenAsyncMainTests.cs (4)
381
var sourceCompilation = CreateEmptyCompilation(source, new[] { corCompilation.
ToMetadataReference
(), taskCompilation.
ToMetadataReference
() }, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1));
421
var sourceCompilation = CreateEmptyCompilation(source, new[] { corCompilation.
ToMetadataReference
(), taskCompilation.
ToMetadataReference
() }, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1));
CodeGen\CodeGenDeconstructTests.cs (4)
7864
Handler", references: WinRtRefs.Concat(new[] { ValueTupleRef, comp1.
ToMetadataReference
() }));
7927
Handler", references: WinRtRefs.Concat(new[] { ValueTupleRef, comp1.
ToMetadataReference
() }));
8476
var lib = CreateCompilationWithMscorlib461(lib_cs, references: new[] { missing.
ToMetadataReference
() }, options: TestOptions.DebugDll);
8490
var comp = CreateCompilationWithMscorlib461(source, references: new[] { lib.
ToMetadataReference
() }, options: TestOptions.DebugDll); // no ValueTuple reference
CodeGen\CodeGenFunctionPointersTests.cs (1)
8666
validate(comp0.
ToMetadataReference
());
CodeGen\CodeGenInParametersTests.cs (5)
2796
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "9");
2827
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "9");
2858
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "9");
2888
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "False");
2918
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "3");
CodeGen\CodeGenIterators.cs (2)
4091
", assemblyName: "libS1").
ToMetadataReference
();
4098
", references: [missingLibS1], assemblyName: "libS2").
ToMetadataReference
();
CodeGen\CodeGenReadonlyStructTests.cs (1)
1564
var comp2 = CreateCompilation("", references: new[] { externalComp.
ToMetadataReference
() });
CodeGen\CodeGenTests.cs (1)
13509
var comp = CreateCompilation(code, references: new[] { reference.
ToMetadataReference
() });
CodeGen\CodeGenTupleTest.cs (97)
353
references: new[] { comp1.
ToMetadataReference
() });
408
references: new[] { SystemRuntimeFacadeRef, ValueTupleRef, comp1.
ToMetadataReference
() });
1690
var compLibCompilationRef = compLib.
ToMetadataReference
();
3769
references: new[] { ValueTupleRef, SystemRuntimeFacadeRef, missingComp.
ToMetadataReference
() });
3773
references: new[] { ValueTupleRef, SystemRuntimeFacadeRef, libComp.
ToMetadataReference
() }, parseOptions: TestOptions.Regular);
3785
references: new[] { ValueTupleRef, SystemRuntimeFacadeRef, libComp.
ToMetadataReference
() }, parseOptions: TestOptions.Regular7_1);
5523
var comp = CreateCompilationWithMscorlib40(source, references: new[] { comp1.
ToMetadataReference
(), comp2.
ToMetadataReference
() });
5532
references: new[] { comp1.
ToMetadataReference
() },
5814
var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.
ToMetadataReference
() });
5851
var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.
ToMetadataReference
() });
5868
var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.
ToMetadataReference
() });
5903
var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.
ToMetadataReference
() });
6049
var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.
ToMetadataReference
() });
6184
var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.
ToMetadataReference
() });
6362
var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.
ToMetadataReference
() });
6381
var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.
ToMetadataReference
() });
6541
var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.
ToMetadataReference
() });
13915
var comp2CompilationRef = comp2.
ToMetadataReference
();
14080
var comp2CompilationRef = comp2.
ToMetadataReference
();
14504
var comp2 = CreateCompilationWithMscorlib40(source2, references: new[] { comp1.
ToMetadataReference
() },
14772
var consumer1 = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseExe, references: new[] { lib.
ToMetadataReference
() });
15033
var consumer1 = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseExe, references: new[] { lib.
ToMetadataReference
() });
15419
var consumer1 = CreateCompilationWithMscorlib46(source, options: TestOptions.ReleaseExe, references: new[] { lib.
ToMetadataReference
() });
15680
var consumer1 = CreateCompilationWithMscorlib46(source, options: TestOptions.ReleaseExe, references: new[] { lib.
ToMetadataReference
() });
16767
var comp1 = CreateCompilation(source, references: new[] { libComp.
ToMetadataReference
() });
16792
references: new[] { comp1.
ToMetadataReference
(), comp2.
ToMetadataReference
() },
16803
references: new[] { comp2.
ToMetadataReference
(), comp1.
ToMetadataReference
() },
16814
references: new[] { comp2.
ToMetadataReference
(ImmutableArray.Create("alias")), comp1.
ToMetadataReference
() },
16854
references: new[] { comp1.
ToMetadataReference
(), comp2.
ToMetadataReference
() },
16865
references: new[] { comp1.
ToMetadataReference
().WithAliases(ImmutableArray.Create("alias")), comp2.
ToMetadataReference
() },
16886
references: new[] { comp1.
ToMetadataReference
(), comp2.
ToMetadataReference
().WithAliases(ImmutableArray.Create("alias1")) },
16926
references: new[] { comp1.
ToMetadataReference
(), comp2.
ToMetadataReference
() },
16940
references: new[] { comp1.
ToMetadataReference
().WithAliases(ImmutableArray.Create("alias")), comp2.
ToMetadataReference
() },
16961
references: new[] { comp1.
ToMetadataReference
(), comp2.
ToMetadataReference
().WithAliases(ImmutableArray.Create("alias1")) },
17023
references: s_valueTupleRefs.Concat(new[] { comp1.
ToMetadataReference
(), comp2.
ToMetadataReference
().WithAliases(ImmutableArray.Create("alias1")) }),
17046
references: s_valueTupleRefs.Concat(new[] { comp1.
ToMetadataReference
(), comp2.
ToMetadataReference
().WithAliases(ImmutableArray.Create("alias1")) }),
17069
comp1.
ToMetadataReference
(),
17070
comp2.
ToMetadataReference
().WithAliases(ImmutableArray.Create("alias1")),
17124
references: new[] { comp1.
ToMetadataReference
(), comp2.
ToMetadataReference
().WithAliases(ImmutableArray.Create("alias1")) },
17178
references: new[] { comp1.
ToMetadataReference
(), comp2.
ToMetadataReference
().WithAliases(ImmutableArray.Create("alias1")) },
17480
var comp = CompileAndVerifyWithMscorlib40(source, expectedOutput: "(1, 2)", references: new[] { tupleComp.
ToMetadataReference
() });
18841
var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.
ToMetadataReference
() });
18859
var comp = (Compilation)CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.
ToMetadataReference
() });
18879
var comp = (Compilation)CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.
ToMetadataReference
() });
18902
var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.
ToMetadataReference
() });
18919
var comp = (Compilation)CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.
ToMetadataReference
() });
18945
var comp = (Compilation)CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp1.
ToMetadataReference
(), tupleComp2.
ToMetadataReference
() });
18970
var comp = (Compilation)CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp1.
ToMetadataReference
(), tupleComp2.
ToMetadataReference
() });
18995
var comp = (Compilation)CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp1.
ToMetadataReference
(), tupleComp2.
ToMetadataReference
() });
19021
var comp = (Compilation)CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp1.
ToMetadataReference
(), tupleComp2.
ToMetadataReference
() });
19059
var comp = (Compilation)CSharpCompilation.Create("test", syntaxTrees: new[] { tree }, references: new[] { (MetadataReference)Net40.References.mscorlib, tupleComp1.
ToMetadataReference
() });
19098
var comp = (Compilation)CSharpCompilation.Create("test", syntaxTrees: new[] { tree }, references: new[] { (MetadataReference)Net40.References.mscorlib, tupleComp1.
ToMetadataReference
() });
19137
var comp = (Compilation)CSharpCompilation.Create("test", syntaxTrees: new[] { tree }, references: new[] { MscorlibRef, tupleComp1.
ToMetadataReference
() });
19176
var comp = (Compilation)CSharpCompilation.Create("test", syntaxTrees: new[] { tree }, references: new[] { MscorlibRef, tupleComp1.
ToMetadataReference
() });
22274
var comp = CreateCompilationWithMscorlib40(source, references: new[] { lib.
ToMetadataReference
() });
22314
var comp = CreateCompilationWithMscorlib40(source, references: new[] { lib.
ToMetadataReference
() });
22394
references: new[] { comp1.
ToMetadataReference
(), comp2.
ToMetadataReference
() },
22481
var comp = CreateCompilationWithMscorlib40(source, references: new[] { compLib.
ToMetadataReference
() });
23446
var comp = CompileAndVerify(source, expectedOutput: "42qq", references: new[] { libComp.
ToMetadataReference
() }, options: TestOptions.DebugExe, verify: Verification.Fails);
24851
var comp2 = CreateCompilation(source2, references: new[] { comp1.
ToMetadataReference
() });
26422
var libRef = useImageReference ? lib.EmitToImageReference() : lib.
ToMetadataReference
();
26466
var missingContainerRef = useImageReference ? missingContainer.EmitToImageReference() : missingContainer.
ToMetadataReference
();
26484
var libRef = useImageReference ? lib.EmitToImageReference() : lib.
ToMetadataReference
();
26529
var missingContainerRef = useImageReference ? missingContainer.EmitToImageReference() : missingContainer.
ToMetadataReference
();
26543
var libRef = useImageReference ? lib.EmitToImageReference() : lib.
ToMetadataReference
();
26590
var missingRef = useImageReference ? missing.EmitToImageReference() : missing.
ToMetadataReference
();
26608
var libRef = useImageReference ? lib.EmitToImageReference() : lib.
ToMetadataReference
();
26696
var compWithMetadataReference = CreateEmptyCompilation(client_cs, references: new[] { MscorlibRef, lib.
ToMetadataReference
() }); // missing reference to vt
26862
var compWithMetadataReference = CreateEmptyCompilation(client_cs, references: new[] { MscorlibRef, lib.
ToMetadataReference
() }); // missing reference to container
26937
var compWithMetadataReference = CreateEmptyCompilation(client_cs, references: new[] { MscorlibRef, lib.
ToMetadataReference
() }); // missing reference to container
27043
var comp1Ref = new[] { comp1.
ToMetadataReference
() };
27127
var comp1Ref = new[] { comp1.
ToMetadataReference
() };
27201
var comp1Ref = new[] { comp1.
ToMetadataReference
() };
27279
var comp1Ref = new[] { comp1.
ToMetadataReference
() };
27977
var comp3 = CreateCompilation("", references: new[] { comp.
ToMetadataReference
() }, targetFramework: TargetFramework.Mscorlib46);
28189
var comp2 = CreateCompilation("", targetFramework: TargetFramework.Mscorlib46, references: new[] { comp.
ToMetadataReference
() });
28303
var comp2 = CreateCompilation("", targetFramework: TargetFramework.Mscorlib46, references: new[] { comp.
ToMetadataReference
() });
28392
var comp3 = CreateCompilation("", references: new[] { comp.
ToMetadataReference
() }, targetFramework: TargetFramework.Mscorlib46);
CodeGen\FixedSizeBufferTests.cs (1)
1155
var comp3 = CreateCompilation("", references: new[] { comp.
ToMetadataReference
() }, targetFramework: TargetFramework.Mscorlib46);
CodeGen\IndexerTests.cs (1)
1240
var comp2 = CreateCompilation(text2, references: [comp1.
ToMetadataReference
()]);
Emit\CompilationEmitTests.cs (2)
1037
var piaMetadataReference = pia.
ToMetadataReference
(embedInteropTypes: true);
1116
var piaMetadataReference = pia.
ToMetadataReference
(embedInteropTypes: true);
Emit\InAttributeModifierTests.cs (41)
42
var verifier = CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5");
78
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5");
102
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5");
129
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5");
153
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5");
179
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5");
206
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5");
2532
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
2579
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
2634
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
2682
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
2729
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
2774
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
2819
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
2864
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
2909
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
2954
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
2999
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
3045
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
3091
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
3137
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
3183
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
3231
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
3279
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
3334
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
3382
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
3430
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
3476
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
3522
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
3568
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
3614
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
3660
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5", symbolValidator: validator);
3693
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5");
3726
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5");
3769
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5");
3811
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5");
4200
CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.
ToMetadataReference
() }, options: TestOptions.ReleaseExe, symbolValidator: validator);
4247
CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.
ToMetadataReference
() }, options: TestOptions.ReleaseExe, symbolValidator: validator);
4296
CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.
ToMetadataReference
() }, options: TestOptions.ReleaseExe, symbolValidator: validator);
4348
CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.
ToMetadataReference
() }, options: TestOptions.ReleaseExe, symbolValidator: validator);
4401
CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.
ToMetadataReference
() }, options: TestOptions.ReleaseExe, symbolValidator: validator);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (24)
Emit\EditAndContinue\AssemblyReferencesTests.cs (10)
211
var compilation0 = CreateEmptyCompilation(src0, new[] { MscorlibRef, lib0.
ToMetadataReference
() }, assemblyName: "C", options: TestOptions.DebugDll);
212
var compilation1 = compilation0.WithSource(src1).WithReferences(new[] { MscorlibRef, lib1.
ToMetadataReference
() });
213
var compilation2 = compilation1.WithSource(src2).WithReferences(new[] { MscorlibRef, lib2.
ToMetadataReference
() });
315
var compilation0 = CreateEmptyCompilation(src0, new[] { MscorlibRef, lib0.
ToMetadataReference
() }, assemblyName: "C", options: TestOptions.DebugDll);
316
var compilation1 = compilation0.WithSource(src1).WithReferences(new[] { MscorlibRef, lib1.
ToMetadataReference
() });
317
var compilation2 = compilation1.WithSource(src2).WithReferences(new[] { MscorlibRef, lib2.
ToMetadataReference
() });
471
var ref01 = lib01.
ToMetadataReference
(ImmutableArray.Create("L0"));
474
var ref02 = lib02.
ToMetadataReference
(ImmutableArray.Create("L0"));
477
var ref11 = lib11.
ToMetadataReference
(ImmutableArray.Create("L1"));
480
var ref12 = lib12.
ToMetadataReference
(ImmutableArray.Create("L1"));
Emit\EditAndContinue\SymbolMatcherTests.cs (2)
307
var compilation0 = CreateCompilation(source, new[] { lib0.
ToMetadataReference
() }, options: TestOptions.DebugDll);
308
var compilation1 = compilation0.WithSource(source).WithReferences(MscorlibRef, lib1.
ToMetadataReference
());
Emit\NumericIntPtrTests.cs (7)
938
var ref1 = comp.
ToMetadataReference
();
1000
var ref1 = comp.
ToMetadataReference
();
1193
var ref1 = comp.
ToMetadataReference
();
3056
var ref1 = comp.
ToMetadataReference
();
10333
comp = CreateEmptyCompilation(source, references: new[] { corlib.
ToMetadataReference
() }, parseOptions: parseOptions);
10921
var comp = CreateCompilation(source, references: new[] { libComp.
ToMetadataReference
() }, targetFramework: TargetFramework.Net70);
10952
var comp = CreateEmptyCompilation(source, references: new[] { libComp.
ToMetadataReference
(), MscorlibRef_v46 });
PDB\PDBUsingTests.cs (5)
678
compilation1.
ToMetadataReference
(),
680
compilation1.
ToMetadataReference
(ImmutableArray.Create("X"))
731
compilation1.
ToMetadataReference
(ImmutableArray.Create("X")),
733
compilation1.
ToMetadataReference
(),
2851
var comp2 = CreateCompilation(source2, new[] { comp1.
ToMetadataReference
() }, options: TestOptions.DebugExe);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (267)
Attributes\AttributeTests.cs (20)
122
var newLibComp2 = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.
ToMetadataReference
() }, assemblyName: "lib");
159
var newLibComp2 = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.
ToMetadataReference
() }, assemblyName: "lib");
199
var newLibComp2 = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.
ToMetadataReference
() }, assemblyName: "lib");
244
var newLibComp2 = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.
ToMetadataReference
() }, assemblyName: "lib");
282
references: new[] { compWithReferenceToLib.
ToMetadataReference
(), newComp.
ToMetadataReference
() }, assemblyName: "lib");
317
var newLibComp2 = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.
ToMetadataReference
(), newComp.
ToMetadataReference
() }, assemblyName: "lib");
392
references: new[] { compWithReferenceToLib.
ToMetadataReference
(), newComp.
ToMetadataReference
() }, assemblyName: "lib");
428
var newLibComp2 = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.
ToMetadataReference
(), newComp.
ToMetadataReference
() }, assemblyName: "lib");
463
var newLibComp2 = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.
ToMetadataReference
(), newComp.
ToMetadataReference
() }, assemblyName: "lib");
994
CreateCompilation(usageSource, references: new[] { definitionComp.
ToMetadataReference
() }, options: WithNullableEnable())
8451
var comp1 = CreateCompilationWithMscorlib40(source2, assemblyName: "Temp0").
ToMetadataReference
();
8476
comp1 = CreateCompilationWithMscorlib40(source2, assemblyName: "Temp1").
ToMetadataReference
();
8477
var comp2 = CreateEmptyCompilation(source3, assemblyName: "Temp2").
ToMetadataReference
();
10466
var comp2 = CreateCompilation(source2, references: new[] { comp1.
ToMetadataReference
() }, parseOptions: TestOptions.Regular9);
10537
var comp2 = CreateCompilation(source2, references: new[] { comp1.
ToMetadataReference
() }, parseOptions: TestOptions.Regular9);
Attributes\AttributeTests_Assembly.cs (1)
1520
var defsRef = CreateCompilationWithMscorlib40(defaultHeaderString + s_defaultNetModuleSourceBody).
ToMetadataReference
();
Attributes\AttributeTests_Conditional.cs (2)
269
CompileAndVerify(source2, references: new[] { comp1.
ToMetadataReference
() }, sourceSymbolValidator: CommonSourceValidatorForCondAttrType, symbolValidator: CommonMetadataValidatorForCondAttrType, expectedOutput: "");
480
CompileAndVerify(source2, references: new[] { comp1.
ToMetadataReference
() }, expectedOutput: s_commonExpectedOutput_ConditionalMethodsTest);
Attributes\AttributeTests_Dynamic.cs (1)
967
var customRef = CreateCompilationWithMscorlib46(customDynamicAttrSource).
ToMetadataReference
();
Attributes\AttributeTests_Embedded.cs (4)
79
CreateCompilation(code, references: new[] { reference.
ToMetadataReference
() }, assemblyName: "Source").VerifyDiagnostics(
159
CreateCompilation(code, references: new[] { reference.
ToMetadataReference
() }).VerifyDiagnostics(
250
}", assemblyName: "reference").
ToMetadataReference
();
278
}").
ToMetadataReference
();
Attributes\AttributeTests_IsByRefLike.cs (12)
137
var referenceA = CreateCompilation(new[] { codeA, GetCompilerFeatureRequiredAttributeText(includeCompilerFeatureRequired) }).VerifyDiagnostics().
ToMetadataReference
();
164
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
191
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
217
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
246
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
275
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
312
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
368
}", references: new[] { code1.
ToMetadataReference
() }, options: options);
381
}", references: new[] { code2.
ToMetadataReference
() }, options: options);
432
}").
ToMetadataReference
();
608
var compilation_CompilationReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.
ToMetadataReference
(embedInteropTypes: true) });
929
CreateCompilation(text, new[] { libComp.
ToMetadataReference
() }).VerifyEmitDiagnostics(
Attributes\AttributeTests_IsUnmanaged.cs (2)
636
", references: new[] { code1.
ToMetadataReference
() }, options: options);
645
", references: new[] { code2.
ToMetadataReference
() }, options: options);
Attributes\AttributeTests_Nullable.cs (3)
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
();
Attributes\AttributeTests_ReadOnlyStruct.cs (11)
127
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
154
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
181
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
207
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
236
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
265
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
302
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
358
}", references: new[] { code1.
ToMetadataReference
() }, options: options);
371
}", references: new[] { code2.
ToMetadataReference
() }, options: options);
422
}").
ToMetadataReference
();
600
var compilation_CompilationReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.
ToMetadataReference
(embedInteropTypes: true) });
Attributes\AttributeTests_RefReadOnly.cs (25)
108
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
191
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
264
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
356
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
462
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
552
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
668
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
799
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
841
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
868
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
894
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
923
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
952
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
989
var referenceA = CreateCompilation(codeA).VerifyDiagnostics().
ToMetadataReference
();
1063
}", references: new[] { code1.
ToMetadataReference
() }, options: options);
1076
}", references: new[] { code2.
ToMetadataReference
() }, options: options);
1148
}").
ToMetadataReference
();
1327
var compilation_CompilationReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.
ToMetadataReference
(embedInteropTypes: true) });
1371
}", references: new[] { reference.
ToMetadataReference
() });
1413
}", references: new[] { reference.
ToMetadataReference
() });
1508
}", references: new[] { reference.
ToMetadataReference
() });
1755
}", assemblyName: "testRef").
ToMetadataReference
();
1844
}").
ToMetadataReference
();
2002
}").
ToMetadataReference
();
2088
}").
ToMetadataReference
();
Attributes\AttributeTests_WellKnownAttributes.cs (17)
3847
CompileAndVerify(source2, references: new[] { compDll.
ToMetadataReference
() }, expectedOutput: expectedOutput);
3955
CompileAndVerify(source2, references: new[] { compDll.
ToMetadataReference
() }, expectedOutput: expectedOutput);
4026
CreateCompilation(source2, references: new[] { compDll.
ToMetadataReference
() }).VerifyDiagnostics(
4105
CreateCompilation(source2, references: new[] { compDll.
ToMetadataReference
() }).VerifyDiagnostics(
4183
CreateCompilation(source2, references: new[] { compDll.
ToMetadataReference
() }).VerifyDiagnostics(
4268
CreateCompilation(source2, references: new[] { compDll.
ToMetadataReference
() }).VerifyDiagnostics(
4890
var client1 = CreateCompilation("", references: new[] { lib_comp.
ToMetadataReference
() });
8601
verify(comp1.
ToMetadataReference
());
8656
verify(comp1.
ToMetadataReference
());
8700
verify(comp1.
ToMetadataReference
());
8743
verify(comp1.
ToMetadataReference
());
8842
verifyReference(comp1.
ToMetadataReference
(), options, expectedDiagnostics);
8895
verify(comp1.
ToMetadataReference
());
8943
verify(comp1.
ToMetadataReference
());
9022
verify(comp1.
ToMetadataReference
());
9177
verify(comp1.
ToMetadataReference
());
9506
verify(comp1.
ToMetadataReference
());
Attributes\InternalsVisibleToAndStrongNameTests.cs (6)
1472
references: new[] { comp.
ToMetadataReference
() },
2976
var comp = CreateCompilation(source1, new[] { lib.
ToMetadataReference
() }, assemblyName: "Issue57742_01");
3011
var comp = CreateCompilation(source1, new[] { lib.
ToMetadataReference
() }, assemblyName: "Issue57742_02");
3052
CompilationReference compilationReference = lib.
ToMetadataReference
();
3176
CompilationReference compilationReference = lib.
ToMetadataReference
();
3243
var comp = CreateCompilation(source1, new[] { lib.
ToMetadataReference
() }, assemblyName: "Issue57742_05");
Diagnostics\DiagnosticAnalyzerTests.cs (1)
1884
var metadataReference = CreateCompilation(source).
ToMetadataReference
();
FirstClassSpanTests.cs (1)
2777
.
ToMetadataReference
();
OverloadResolutionPriorityTests.cs (5)
258
var derivedReference = useMetadataReference ? derivedComp.
ToMetadataReference
() : derivedComp.EmitToImageReference();
307
var derivedReference = useMetadataReference ? derivedComp.
ToMetadataReference
() : derivedComp.EmitToImageReference();
690
var comp3 = CreateCompilation(source3, references: [comp2.ToMetadataReference(), comp1_2.
ToMetadataReference
()], targetFramework: TargetFramework.Standard);
750
var comp3 = CreateCompilation(source3, references: [comp2.ToMetadataReference(), comp1_2.
ToMetadataReference
()], targetFramework: TargetFramework.Standard);
798
var comp3 = CreateCompilation(source3, references: [comp2.ToMetadataReference(), comp1_2.
ToMetadataReference
()]);
RefReadonlyParameterTests.cs (14)
1560
var comp1Ref = comp1.
ToMetadataReference
();
3167
var comp1Ref = comp1.
ToMetadataReference
();
6675
var comp1v1Ref = emit ? comp1v1.EmitToImageReference() : comp1v1.
ToMetadataReference
();
6684
var comp1v2Ref = emit ? comp1v2.EmitToImageReference() : comp1v2.
ToMetadataReference
();
6693
var comp2Ref = emit ? comp2.EmitToImageReference() : comp2.
ToMetadataReference
();
7154
var comp1Ref = comp1.
ToMetadataReference
(embedInteropTypes: true);
7706
var comp1Ref = comp1.
ToMetadataReference
();
7808
var comp1Ref = comp1.
ToMetadataReference
();
7973
var comp1Ref = comp1.
ToMetadataReference
();
8048
var comp1Ref = comp1.
ToMetadataReference
();
8214
var comp1Ref = comp1.
ToMetadataReference
();
8329
var comp1Ref = comp1.
ToMetadataReference
();
8541
var comp1Ref = comp1.
ToMetadataReference
();
8635
var comp1Ref = comp1.
ToMetadataReference
();
RefStructInterfacesTests.cs (90)
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
()];
5476
CreateCompilation(src2, references: [comp2.
ToMetadataReference
()], targetFramework: TargetFramework.Net70).VerifyDiagnostics(
5609
CreateCompilation(src2, references: [comp2.
ToMetadataReference
()], targetFramework: TargetFramework.Net70).VerifyDiagnostics(
6149
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
6211
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
6269
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
6337
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
6405
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
6474
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
7274
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
7277
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
7280
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
7320
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
7337
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
7340
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
7358
var comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
7361
comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
7364
comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
8686
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
8689
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
8692
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
8728
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
8745
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
8748
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
8762
var comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
8765
comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
8768
comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
8827
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
8834
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
8837
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
11756
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
11759
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
11762
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
11812
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
11826
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
11829
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
11841
var comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
11844
comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
11847
comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
13706
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
13716
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
13719
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
13764
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
13793
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
13796
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
13814
var comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
13817
comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
13820
comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
16139
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
16142
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
16145
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
16181
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
16198
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
16201
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
16215
var comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
16218
comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
16221
comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
16285
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
16292
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
16295
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
17391
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
17398
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
17407
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
17467
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
17487
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
17494
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
17510
var comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
17513
comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
17516
comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
18903
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
18906
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
18909
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
18943
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
18957
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
18960
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
18974
var comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
18977
comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
18980
comp3 = CreateCompilation(src3, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
19039
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular12);
19046
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, parseOptions: TestOptions.Regular13);
19049
comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: s_targetFrameworkSupportingByRefLikeGenerics);
20047
var comp1Ref = CreateCompilation(src1, targetFramework: s_targetFrameworkSupportingByRefLikeGenerics).
ToMetadataReference
();
20104
comp1Ref = CreateCompilation(src1, targetFramework: TargetFramework.Mscorlib461Extended).
ToMetadataReference
();
20304
var comp1Ref = CreateCompilation(src1, targetFramework: s_targetFrameworkSupportingByRefLikeGenerics).
ToMetadataReference
();
20361
comp1Ref = CreateCompilation(src1, targetFramework: TargetFramework.Mscorlib461Extended).
ToMetadataReference
();
Semantics\CollectionExpressionTests.cs (2)
7654
var refA = comp.
ToMetadataReference
();
19420
var refA = comp.
ToMetadataReference
();
Semantics\ExperimentalAttributeTests.cs (12)
933
var derivedComp = CreateCompilation(derivedSrc, new[] { originalC.
ToMetadataReference
(), attrRef }, targetFramework: TargetFramework.Standard);
936
var comp = CreateCompilation("_ = new Derived();", new[] { derivedComp.
ToMetadataReference
(), retargetedC.
ToMetadataReference
() }, targetFramework: TargetFramework.Standard);
968
var derivedComp = CreateCompilation(derivedSrc, new[] { originalC.
ToMetadataReference
(), attrRef }, targetFramework: TargetFramework.Standard);
971
var comp = CreateCompilation("_ = new Derived();", new[] { derivedComp.
ToMetadataReference
(), retargetedC.
ToMetadataReference
() }, targetFramework: TargetFramework.Standard);
998
var derivedComp = CreateCompilation(@base, new[] { originalC.
ToMetadataReference
(), attrRef }, targetFramework: TargetFramework.Standard);
1001
var comp = CreateCompilation("_ = new Derived();", new[] { derivedComp.
ToMetadataReference
(), retargetedC.
ToMetadataReference
() }, targetFramework: TargetFramework.Standard);
1033
var derivedComp = CreateCompilation(@base, new[] { originalC.
ToMetadataReference
(), attrRef }, targetFramework: TargetFramework.Standard);
1036
var comp = CreateCompilation("_ = new Derived();", new[] { derivedComp.
ToMetadataReference
(), retargetedC.
ToMetadataReference
() }, targetFramework: TargetFramework.Standard);
Semantics\InlineArrayTests.cs (3)
1166
var comp2 = CreateCompilation("", references: new[] { comp1.
ToMetadataReference
() }, targetFramework: TargetFramework.Net60);
2175
var comp2 = CreateCompilation(src2, references: new[] { comp1.
ToMetadataReference
() }, targetFramework: TargetFramework.Net80, options: TestOptions.DebugExe);
2299
var comp2 = CreateCompilation(src2, references: new[] { comp1.
ToMetadataReference
() }, targetFramework: TargetFramework.Net80, options: TestOptions.DebugExe);
Semantics\ParamsCollectionTests.cs (26)
1022
var builder = CreateCompilation(builderSource, references: [myCollection_v0.
ToMetadataReference
()], targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseDll);
1037
var myCollection = CreateCompilation(myCollectionSource, references: [builder.
ToMetadataReference
()], targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseDll, assemblyName: "Collection");
4018
verify(comp1.
ToMetadataReference
());
4085
verify(comp1.
ToMetadataReference
());
4200
verify(comp1.
ToMetadataReference
());
4324
verify(comp1.
ToMetadataReference
());
4400
verify(comp1.
ToMetadataReference
());
4446
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe);
4450
var comp4 = CreateCompilation(src2, references: [comp3.
ToMetadataReference
()], targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe);
4453
var comp5 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseModule);
4515
var comp2 = CreateCompilation(src, references: [comp1.
ToMetadataReference
()], targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe.WithMetadataImportOptions(MetadataImportOptions.All));
4668
var comp2 = CreateCompilation(src, references: [comp1.
ToMetadataReference
()], targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe.WithMetadataImportOptions(MetadataImportOptions.All));
4742
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], options: TestOptions.ReleaseExe);
4771
var comp2 = CreateCompilation(src2, references: [comp1.
ToMetadataReference
()], options: TestOptions.ReleaseExe);
12765
var comp1Ref = comp1.
ToMetadataReference
();
12789
var comp5Ref = comp5.
ToMetadataReference
();
13157
var compilation_CompilationReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.
ToMetadataReference
(embedInteropTypes: true) });
13217
var compilation_CompilationReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.
ToMetadataReference
(embedInteropTypes: true) });
13280
var compilation_CompilationReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comp1Ref, comAssembly.
ToMetadataReference
(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);
13554
var comp4 = CreateCompilation(source4, references: [comp1Ref, comp3.
ToMetadataReference
()], options: TestOptions.ReleaseExe);
13579
var comp5 = CreateCompilation(source5, references: [comp1Ref, comp3.
ToMetadataReference
()], options: TestOptions.UnsafeReleaseExe);
13655
var comp4 = CreateCompilation(source4, references: [comp1Ref, comp3.
ToMetadataReference
()], options: TestOptions.ReleaseExe);
13680
var comp5 = CreateCompilation(source5, references: [comp1Ref, comp3.
ToMetadataReference
()], options: TestOptions.UnsafeReleaseExe);
Semantics\RecordTests.cs (9)
9801
var refA = useCompilationReference ? comp.
ToMetadataReference
() : comp.EmitToImageReference();
10571
var refA = useCompilationReference ? comp.
ToMetadataReference
() : comp.EmitToImageReference();
12615
var refA = useCompilationReference ? compA.
ToMetadataReference
() : compA.EmitToImageReference();
13303
var refA = compA.
ToMetadataReference
();
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();
30188
var refA = useCompilationReference ? compA.
ToMetadataReference
() : compA.EmitToImageReference();
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (6)
IOperation\IOperationTests_IArgument.cs (6)
1257
var lib0 = CreateCompilation(source0).
ToMetadataReference
();
1473
var comp1 = CreateCompilation(source1, references: new[] { comp0.
ToMetadataReference
() });
1519
var comp1 = CreateCompilation(source1, references: new[] { comp0.
ToMetadataReference
() });
1565
var comp1 = CreateCompilation(source1, references: new[] { comp0.
ToMetadataReference
() });
1610
var comp1 = CreateCompilation(source1, references: new[] { comp0.
ToMetadataReference
() });
1656
var comp1 = CreateCompilation(source1, references: new[] { comp0.
ToMetadataReference
() });
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (1)
InteractiveSessionReferencesTests.cs (1)
532
var portableLibRef = portableLib.
ToMetadataReference
();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (181)
Semantics\DelegateTypeTests.cs (12)
18796
var comp2 = CreateCompilation(source2, new[] { comp1.
ToMetadataReference
() });
18822
var comp2 = CreateCompilation(source2, new[] { comp1.
ToMetadataReference
() });
18908
var comp2 = CreateCompilation(source2, new[] { comp1.
ToMetadataReference
() });
18912
comp2 = CreateCompilation(source2, new[] { comp1.
ToMetadataReference
() });
18916
comp2 = CreateCompilation(source2, new[] { comp1.
ToMetadataReference
() });
18920
comp2 = CreateCompilation(source2, new[] { comp1.
ToMetadataReference
() });
19033
var comp2 = CreateCompilation(source2, new[] { comp1.
ToMetadataReference
() });
19063
var comp2 = CreateCompilation(source2, new[] { comp1.
ToMetadataReference
() });
19101
var comp2 = CreateCompilation(source2, new[] { comp1.
ToMetadataReference
() });
19105
comp2 = CreateCompilation(source2, new[] { comp1.
ToMetadataReference
() });
19109
comp2 = CreateCompilation(source2, new[] { comp1.
ToMetadataReference
() });
19173
var comp2 = CreateCompilation(source2, new[] { comp1.
ToMetadataReference
() });
Semantics\ForEachTests.cs (3)
3470
var comp2 = CreateEmptyCompilation(source2, new[] { comp1.
ToMetadataReference
() }, options: TestOptions.DebugDll);
3498
var comp4 = CreateEmptyCompilation(source4, new[] { comp2.
ToMetadataReference
(), comp3.
ToMetadataReference
() });
Semantics\FunctionPointerTests.cs (1)
2120
var comp = CreateCompilationWithIL("", il, references: new[] { cComp.
ToMetadataReference
() }, targetFramework: TargetFramework.NetCoreApp, options: TestOptions.UnsafeReleaseDll);
Semantics\GlobalUsingDirectiveTests.cs (19)
167
var comp1Ref = comp1.
ToMetadataReference
().WithAliases(new[] { "alias1" });
276
var comp1Ref = comp1.
ToMetadataReference
().WithAliases(new[] { "alias1" });
386
var comp1Ref = comp1.
ToMetadataReference
().WithAliases(new[] { "alias1" });
435
var extCompRef = extComp.
ToMetadataReference
().WithAliases(new[] { "ext" });
581
var extCompRef = extComp.
ToMetadataReference
().WithAliases(new[] { "ext" });
1140
var extCompRef = extComp.
ToMetadataReference
().WithAliases(new[] { "ext" });
1275
var extCompRef = extComp.
ToMetadataReference
().WithAliases(new[] { "ext" });
2045
var comp1Ref = comp1.
ToMetadataReference
().WithAliases(new[] { "alias1", "alias2" });
2195
var comp1Ref = comp1.
ToMetadataReference
().WithAliases(new[] { "alias1" });
3367
CompilationReference newCompRef = newComp.
ToMetadataReference
();
3369
references: new[] { compWithReferenceToLib.
ToMetadataReference
(), newCompRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview);
3377
references: new[] { compWithReferenceToLib.
ToMetadataReference
(), newCompRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview);
3389
references: new[] { compWithReferenceToLib.
ToMetadataReference
(), newCompRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview);
3405
references: new[] { compWithReferenceToLib.
ToMetadataReference
(), newCompRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview);
3421
references: new[] { compWithReferenceToLib.
ToMetadataReference
(), newCompRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview);
3437
references: new[] { compWithReferenceToLib.
ToMetadataReference
(), newCompRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview);
3454
var extCompRef = extComp.
ToMetadataReference
().WithAliases(new[] { "ext" });
3645
var extCompRef = extComp.
ToMetadataReference
().WithAliases(new[] { "ext" });
4514
var comp1Ref = comp1.
ToMetadataReference
().WithAliases(new[] { "A" });
Semantics\InitOnlyMemberTests.cs (19)
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
() });
312
var comp = CreateCompilation(source, parseOptions: TestOptions.Regular8, references: new[] { lib.
ToMetadataReference
() }, assemblyName: "comp");
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
() },
4198
var comp1Ref = new[] { comp1.
ToMetadataReference
() };
Semantics\InterpolationTests.cs (7)
1846
foreach (var reference in new[] { comp1.EmitToImageReference(), comp1.
ToMetadataReference
() })
2262
foreach (var reference in new[] { comp1.EmitToImageReference(), comp1.
ToMetadataReference
() })
7910
CreateCompilation(@"C.M(1, " + expression + @");", new[] { comp.
ToMetadataReference
() }).VerifyDiagnostics(
7978
comp = CreateCompilation(executableCode, new[] { dependency.
ToMetadataReference
() });
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
() })
Semantics\NativeIntegerTests.cs (20)
185
var ref1 = comp.
ToMetadataReference
();
701
var ref1 = comp.
ToMetadataReference
();
777
var refA = comp.
ToMetadataReference
();
858
var refA = comp.
ToMetadataReference
();
973
var refA = comp.
ToMetadataReference
();
1065
var refB = comp.
ToMetadataReference
();
1227
var refA = comp.
ToMetadataReference
();
1512
var ref1 = comp.
ToMetadataReference
();
1594
var ref1 = comp.
ToMetadataReference
();
1647
var ref1 = comp.
ToMetadataReference
();
3117
var ref1 = comp.
ToMetadataReference
();
3161
var ref1 = comp.
ToMetadataReference
();
3196
var ref1 = comp.
ToMetadataReference
();
3258
var ref1 = comp.
ToMetadataReference
();
3301
var ref1 = comp.
ToMetadataReference
();
3360
var ref1 = comp.
ToMetadataReference
();
3532
var ref1 = comp.
ToMetadataReference
();
3565
var ref1 = comp.
ToMetadataReference
();
3598
var ref1 = comp.
ToMetadataReference
();
7218
var ref1 = comp.
ToMetadataReference
();
Semantics\NonTrailingNamedArgumentsTests.cs (1)
336
var verifier1 = CompileAndVerify(source, expectedOutput: "1 2.", parseOptions: TestOptions.Regular7_2, references: new[] { lib.
ToMetadataReference
() });
Semantics\NullableReferenceTypesTests.cs (55)
8517
var comp2 = CreateCompilation(new[] { client }, options: WithNullableEnable(), references: new[] { c.
ToMetadataReference
() });
8534
comp2 = CreateCompilation(new[] { client }, options: WithNullableEnable(), references: new[] { c.
ToMetadataReference
() });
14336
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
14388
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
17185
var comp2 = CreateCompilation(source2, references: new[] { comp1.
ToMetadataReference
() }, options: WithNullableEnable());
61551
" }, options: WithNullableEnable(), references: new MetadataReference[] { piaCompilation.
ToMetadataReference
(embedInteropTypes: true) });
61602
" }, options: WithNullableEnable(), references: new MetadataReference[] { piaCompilation.
ToMetadataReference
(embedInteropTypes: true) });
77109
references: new[] { c0.
ToMetadataReference
() });
77150
references: new[] { c0.
ToMetadataReference
() });
77371
c = CreateCompilation(new[] { source2 }, new[] { c1.
ToMetadataReference
() },
77506
c = CreateCompilation(new[] { source2 }, new[] { c1.
ToMetadataReference
() },
77539
c = CreateCompilation(new[] { source2 }, new[] { c1.
ToMetadataReference
() },
77678
c = CreateCompilation(new[] { source2 }, new[] { c1.
ToMetadataReference
() },
77819
c = CreateCompilation(new[] { source2 }, new[] { c1.
ToMetadataReference
() },
77980
c = CreateCompilation(new[] { source2 }, new[] { c1.
ToMetadataReference
() },
98649
var comp3 = CreateCompilation(new[] { source2 }, references: new[] { comp2.
ToMetadataReference
() }, options: WithNullable(NullableContextOptions.Warnings), parseOptions: TestOptions.Regular8);
98673
var comp5 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), references: new[] { comp4.
ToMetadataReference
() });
99337
var comp3 = CreateCompilation(new[] { source2 }, references: new[] { comp2.
ToMetadataReference
() }, options: WithNullable(NullableContextOptions.Warnings), parseOptions: TestOptions.Regular8);
99361
var comp5 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), references: new[] { comp4.
ToMetadataReference
() });
99439
var comp2 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), references: new[] { comp1.
ToMetadataReference
() });
99456
var comp4 = CreateCompilation(new[] { source2 }, options: WithNullableDisable(), references: new[] { comp1.
ToMetadataReference
() });
99472
var comp7 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), references: new[] { comp6.
ToMetadataReference
() });
99475
var comp9 = CreateCompilation(new[] { source2 }, options: WithNullableDisable(), references: new[] { comp6.
ToMetadataReference
() });
100114
var comp3 = CreateCompilation(new[] { source2 }, references: new[] { comp2.
ToMetadataReference
() }, options: WithNullable(NullableContextOptions.Warnings));
100147
var comp5 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), references: new[] { comp4.
ToMetadataReference
() });
100159
var comp6 = CreateCompilation(new[] { source2 }, references: new[] { comp4.
ToMetadataReference
() });
100233
var comp3 = CreateCompilation(new[] { source2 }, references: new[] { comp2.
ToMetadataReference
() }, options: WithNullable(NullableContextOptions.Warnings));
100258
var comp5 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), references: new[] { comp4.
ToMetadataReference
() });
100264
var comp6 = CreateCompilation(new[] { source2 }, references: new[] { comp4.
ToMetadataReference
() });
101287
foreach (var reference in new[] { comp1.
ToMetadataReference
(), comp1.EmitToImageReference() })
101368
foreach (var reference in new[] { comp1.
ToMetadataReference
(), comp1.EmitToImageReference() })
106107
foreach (var reference in new[] { comp1.
ToMetadataReference
(), comp1.EmitToImageReference() })
109251
foreach (var reference in new[] { comp0.
ToMetadataReference
(), comp0.EmitToImageReference() })
110997
MetadataReference ref0 = comp.
ToMetadataReference
();
112640
MetadataReference ref0 = comp0.
ToMetadataReference
();
112659
ref0 = comp0.
ToMetadataReference
();
116162
var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
ToMetadataReference
() });
116200
var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
ToMetadataReference
() });
116237
var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
ToMetadataReference
() });
116274
var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
ToMetadataReference
() });
116316
var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
ToMetadataReference
() });
116358
var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
ToMetadataReference
() });
116399
var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
ToMetadataReference
() });
116443
var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
ToMetadataReference
() });
116484
var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
ToMetadataReference
() });
116527
var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.
ToMetadataReference
() });
116645
var compilation3 = CreateEmptyCompilation(source2, options: WithNullableEnable(TestOptions.ReleaseDll), references: new[] { compilation1.
ToMetadataReference
(), MinCorlibRef });
116686
var compilation5 = CreateEmptyCompilation(source2, options: WithNullableEnable(TestOptions.ReleaseDll), references: new[] { compilation1.
ToMetadataReference
() });
116754
var compilation7 = CreateEmptyCompilation(source2, options: WithNullableEnable(TestOptions.ReleaseDll), references: new[] { compilation1.
ToMetadataReference
(), MscorlibRef });
145018
references: new[] { spanRef, defComp.
ToMetadataReference
() },
155815
var nullableAttrRef = useImageReference ? nullableAttrComp.EmitToImageReference() : nullableAttrComp.
ToMetadataReference
();
155834
var libRef = useImageReference ? lib.EmitToImageReference() : lib.
ToMetadataReference
();
160364
" }, options: WithNullableEnable(), references: new MetadataReference[] { piaCompilation.
ToMetadataReference
(embedInteropTypes: true) });
160415
" }, options: WithNullableEnable(), references: new MetadataReference[] { piaCompilation.
ToMetadataReference
(embedInteropTypes: true) });
160465
" }, options: WithNullableEnable(), references: new MetadataReference[] { piaCompilation.
ToMetadataReference
(embedInteropTypes: true) });
Semantics\OverloadResolutionTests.cs (2)
9576
var comp1Ref = comp1.
ToMetadataReference
();
11532
CreateCompilation(code, references: new[] { libComp.
ToMetadataReference
() }).VerifyDiagnostics(
Semantics\RawInterpolationTests_Handler.cs (7)
214
foreach (var reference in new[] { comp1.EmitToImageReference(), comp1.
ToMetadataReference
() })
632
foreach (var reference in new[] { comp1.EmitToImageReference(), comp1.
ToMetadataReference
() })
6093
CreateCompilation(@"C.M(1, " + expression + @");", new[] { comp.
ToMetadataReference
() }).VerifyDiagnostics(
6164
comp = CreateCompilation(executableCode, new[] { dependency.
ToMetadataReference
() });
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
() })
Semantics\RecordStructTests.cs (2)
510
var comp2 = CreateCompilation("", targetFramework: TargetFramework.Mscorlib46, references: new[] { comp.
ToMetadataReference
() });
5085
CompileAndVerify(source2, references: new[] { useImageReference ? comp1.EmitToImageReference() : comp1.
ToMetadataReference
() }, expectedOutput: @"
Semantics\RefEscapingTests.cs (2)
8235
var comp1 = CreateCompilation(source1, references: new[] { comp0.
ToMetadataReference
() }, parseOptions: TestOptions.Regular11);
8245
comp1 = CreateCompilation(source1, references: new[] { comp0.
ToMetadataReference
() }, parseOptions: TestOptions.Regular10);
Semantics\RefExtensionMethodsTests.cs (18)
395
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "55");
437
}", references: new[] { reference.
ToMetadataReference
() }).VerifyDiagnostics(
481
}", references: new[] { reference.
ToMetadataReference
() }).VerifyDiagnostics(
525
}", references: new[] { reference.
ToMetadataReference
() }).VerifyDiagnostics(
565
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "55");
607
}", references: new[] { reference.
ToMetadataReference
() }).VerifyDiagnostics(
651
}", references: new[] { reference.
ToMetadataReference
() }).VerifyDiagnostics(
940
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "55");
982
}", references: new[] { reference.
ToMetadataReference
() }).VerifyDiagnostics(
1026
}", references: new[] { reference.
ToMetadataReference
() }).VerifyDiagnostics(
1070
}", references: new[] { reference.
ToMetadataReference
() }).VerifyDiagnostics(
1114
}", references: new[] { reference.
ToMetadataReference
() }).VerifyDiagnostics(
1158
}", references: new[] { reference.
ToMetadataReference
() }).VerifyDiagnostics(
1202
}", references: new[] { reference.
ToMetadataReference
() }).VerifyDiagnostics(
2328
references: new[] { reference.
ToMetadataReference
() }).VerifyDiagnostics(
2341
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5");
2432
references: new[] { reference.
ToMetadataReference
() }).VerifyDiagnostics(
2445
CompileAndVerify(code, references: new[] { reference.
ToMetadataReference
() }, expectedOutput: "5");
Semantics\RefFieldTests.cs (3)
330
var refA = comp.
ToMetadataReference
();
11965
var refA = comp.
ToMetadataReference
();
22870
var refA = comp.
ToMetadataReference
();
Semantics\ScriptSemanticsTests.cs (1)
89
return taskCompilation.
ToMetadataReference
();
Semantics\StructConstructorTests.cs (2)
223
var refA = comp.
ToMetadataReference
();
3219
var refA = comp.
ToMetadataReference
();
Semantics\UseSiteErrorTests.cs (7)
1046
references: [NetFramework.mscorlib, delComp.
ToMetadataReference
()],
1060
references: [NetFramework.mscorlib, lib1Comp.
ToMetadataReference
()],
2333
var compilation3 = CreateEmptyCompilation(source2, parseOptions: parseOptions, options: TestOptions.ReleaseDll, references: new[] { compilation1.
ToMetadataReference
(), MinCorlibRef });
2374
var compilation5 = CreateEmptyCompilation(source2, parseOptions: parseOptions, options: TestOptions.ReleaseDll, references: new[] { compilation1.
ToMetadataReference
() });
2419
var compilation7 = CreateEmptyCompilation(source2, parseOptions: parseOptions, options: TestOptions.ReleaseDll, references: new[] { compilation1.
ToMetadataReference
(), MscorlibRef });
2462
}", assemblyName: "libS1").
ToMetadataReference
();
2469
", references: new[] { UnmanagedUseSiteError_Ref1 }, assemblyName: "libS2").
ToMetadataReference
();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (720)
BadSymbolReference.cs (2)
806
var comp3 = CreateEmptyCompilation(project3Source, new[] { MscorlibRef, comp1.
ToMetadataReference
(), comp2.
ToMetadataReference
() }, assemblyName: "Project3");
Compilation\CompilationAPITests.cs (8)
1180
var compRef1 = comp1.
ToMetadataReference
();
1181
var compRef2 = comp2.
ToMetadataReference
();
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();
Compilation\GetUnusedImportDirectivesTests.cs (4)
73
var classLib2 = CreateCompilation(source: class2Source, assemblyName: "ClassLibrary2", references: new[] { classLib1.
ToMetadataReference
() });
90
var comp = CreateCompilation(tree, new[] { classLib1.
ToMetadataReference
(), classLib2.
ToMetadataReference
() }, assemblyName: "ConsoleApplication");
245
references: new[] { ivtCompilation.
ToMetadataReference
() },
Compilation\ReferenceManagerTests.cs (20)
51
}", references: new MetadataReference[] { ifaceDef.
ToMetadataReference
(), wimpl },
981
var ref1 = lib1.
ToMetadataReference
(embedInteropTypes: true);
982
var ref2 = lib2.
ToMetadataReference
(embedInteropTypes: false);
2249
CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] public class C {}", new[] { MscorlibRef }, assemblyName: "C").
ToMetadataReference
(),
2266
CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""0.0.0.0"")] public class C {}", new[] { MscorlibRef }, assemblyName: "C").
ToMetadataReference
(),
2267
CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.1"")] public class C {}", new[] { MscorlibRef }, assemblyName: "C").
ToMetadataReference
(),
2268
CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public class C {}", new[] { MscorlibRef }, assemblyName: "C").
ToMetadataReference
(),
2269
CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] public class C {}", new[] { MscorlibRef }, assemblyName: "C").
ToMetadataReference
(),
2270
CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.1.0.0"")] public class C {}", new[] { MscorlibRef }, assemblyName: "C").
ToMetadataReference
().
2291
CreateCompilation(@"[assembly: System.Reflection.AssemblyVersion(""0.0.0.0"")] public class C {}", assemblyName: "C").
ToMetadataReference
(),
2292
CreateCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.1"")] public class C {}", assemblyName: "C").
ToMetadataReference
(aliases: ImmutableArray.Create("X", "Y")),
2293
CreateCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public class C {}", assemblyName: "C").
ToMetadataReference
(),
2294
CreateCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] public class C {}", assemblyName: "C").
ToMetadataReference
(),
2295
CreateCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.1.0.0"")] public class C {}", assemblyName: "C").
ToMetadataReference
().
2704
var aRef = CreateCompilationWithMscorlib46("public interface A : D { }", new[] { dRef }, assemblyName: "A").
ToMetadataReference
();
2720
var aRef = CreateCompilationWithMscorlib46("public interface A : D { }", new[] { dRef }, assemblyName: "A").
ToMetadataReference
();
2743
var aRef = CreateCompilationWithMscorlib46("public interface A : D { }", new[] { bRef }, assemblyName: "A").
ToMetadataReference
();
2745
var eRef = CreateCompilationWithMscorlib46("public interface E { }", assemblyName: "E").
ToMetadataReference
();
2769
var aRef = CreateCompilationWithMscorlib46("public interface A : D { }", new[] { dRef }, assemblyName: "A").
ToMetadataReference
();
2770
var bRef = CreateCompilationWithMscorlib46("public interface B : D { }", new[] { dRef }, assemblyName: "B").
ToMetadataReference
();
Compilation\SemanticModelAPITests.cs (2)
90
references: new[] { comp1.
ToMetadataReference
() });
95
references: new[] { comp1.
ToMetadataReference
() });
Compilation\UsedAssembliesTests.cs (119)
71
verify<RetargetingAssemblySymbol>(source2, comp1.
ToMetadataReference
());
398
verify<SourceAssemblySymbol>(source2, comp1.
ToMetadataReference
());
432
verify<RetargetingAssemblySymbol>(source2, comp1.
ToMetadataReference
());
455
var comp1Ref = comp1.
ToMetadataReference
();
507
var comp0Ref = comp0.
ToMetadataReference
();
521
var comp1Ref = comp1.
ToMetadataReference
();
577
var comp0Ref = comp0.
ToMetadataReference
();
685
var comp1Ref = comp1.
ToMetadataReference
();
747
var comp0Ref = comp0.
ToMetadataReference
();
766
var comp1Ref = comp1.
ToMetadataReference
();
947
var comp0Ref = comp0.
ToMetadataReference
();
966
var comp1Ref = comp1.
ToMetadataReference
();
1118
var comp0Ref = comp0.
ToMetadataReference
();
1132
var comp1Ref = comp1.
ToMetadataReference
();
1278
var comp0Ref = comp0.
ToMetadataReference
();
1292
var comp1Ref = comp1.
ToMetadataReference
();
1378
verify<SourceAssemblySymbol>(source2, comp1.
ToMetadataReference
());
1416
var reference0 = comp0.
ToMetadataReference
();
1417
var reference1 = comp1.
ToMetadataReference
();
1469
var comp0Ref = comp0.
ToMetadataReference
();
1479
var comp1Ref = comp1.
ToMetadataReference
();
1507
var comp0Ref = comp0.
ToMetadataReference
();
1517
var comp1Ref = comp1.
ToMetadataReference
();
1548
var comp0Ref = comp0.
ToMetadataReference
();
1560
var comp1Ref = comp1.
ToMetadataReference
();
1570
var comp2Ref = comp2.
ToMetadataReference
();
1628
var comp5Ref = comp5.
ToMetadataReference
(embedInteropTypes: true);
1631
var comp6Ref = comp6.
ToMetadataReference
();
1635
var comp7Ref = comp7.
ToMetadataReference
(embedInteropTypes: false);
1684
var comp0Ref = comp0.
ToMetadataReference
();
1694
var comp1Ref = comp1.
ToMetadataReference
();
1705
var comp2Ref = comp2.
ToMetadataReference
();
1737
var comp0Ref = comp0.
ToMetadataReference
();
1747
var comp1Ref = comp1.
ToMetadataReference
();
1757
var comp2Ref = comp2.
ToMetadataReference
();
1791
var comp0Ref = comp0.
ToMetadataReference
();
1803
var comp1Ref = comp1.
ToMetadataReference
();
1874
var comp0Ref = comp0.
ToMetadataReference
();
1886
var comp1Ref = comp1.
ToMetadataReference
();
1941
var comp5Ref = comp5.
ToMetadataReference
(embedInteropTypes: true);
1944
var comp6Ref = comp6.
ToMetadataReference
();
1948
var comp7Ref = comp7.
ToMetadataReference
(embedInteropTypes: false);
1969
var comp1Ref = comp1.
ToMetadataReference
();
2023
var comp0Ref = comp0.
ToMetadataReference
();
2033
var comp1Ref = comp1.
ToMetadataReference
();
2063
var comp0Ref = comp0.
ToMetadataReference
();
2074
var comp1Ref = comp1.
ToMetadataReference
();
2107
var comp1Ref = comp1.
ToMetadataReference
();
2167
var comp1Ref = comp1.
ToMetadataReference
();
2361
var comp1Ref = comp1.
ToMetadataReference
();
2428
var comp0Ref = comp0.
ToMetadataReference
(embedInteropTypes: true);
2461
var comp3Ref = comp3.
ToMetadataReference
(embedInteropTypes: false);
2496
var comp0Ref = comp0.
ToMetadataReference
(embedInteropTypes: true);
2512
var comp3Ref = comp3.
ToMetadataReference
(embedInteropTypes: false);
2584
var comp0Ref = comp0.
ToMetadataReference
(embedInteropTypes: true);
2600
var comp3Ref = comp3.
ToMetadataReference
(embedInteropTypes: false);
2672
var comp0Ref = comp0.
ToMetadataReference
(embedInteropTypes: true);
2688
var comp3Ref = comp3.
ToMetadataReference
(embedInteropTypes: false);
2756
var comp0Ref = comp0.
ToMetadataReference
(embedInteropTypes: true);
2773
var comp3Ref = comp3.
ToMetadataReference
(embedInteropTypes: false);
2845
var comp0Ref = comp0.
ToMetadataReference
(embedInteropTypes: true);
2861
var comp3Ref = comp3.
ToMetadataReference
(embedInteropTypes: false);
2933
var comp0Ref = comp0.
ToMetadataReference
(embedInteropTypes: true);
2949
var comp3Ref = comp3.
ToMetadataReference
(embedInteropTypes: false);
2997
var comp0Ref = comp0.
ToMetadataReference
(embedInteropTypes: true);
3040
var comp3Ref = comp3.
ToMetadataReference
(embedInteropTypes: false);
3306
var comp0Ref = comp0.
ToMetadataReference
(embedInteropTypes: true);
3350
var comp3Ref = comp3.
ToMetadataReference
(embedInteropTypes: false);
3557
var comp0Ref = comp0.
ToMetadataReference
();
3574
var comp1Ref = comp1.
ToMetadataReference
();
3705
var comp0Ref = comp0.
ToMetadataReference
();
3722
var comp1Ref = comp1.
ToMetadataReference
();
3853
var comp0Ref = comp0.
ToMetadataReference
();
3866
var comp1Ref = comp1.
ToMetadataReference
();
3929
var comp0Ref = comp0.
ToMetadataReference
();
3942
var comp1Ref = comp1.
ToMetadataReference
();
4044
var comp0Ref = comp0.
ToMetadataReference
();
4057
var comp1Ref = comp1.
ToMetadataReference
();
4148
var comp0Ref = comp0.
ToMetadataReference
();
4157
var comp1Ref = comp1.
ToMetadataReference
();
4263
var comp0Ref = comp0.
ToMetadataReference
();
4276
var comp1Ref = comp1.
ToMetadataReference
();
4289
var comp2Ref = comp2.
ToMetadataReference
();
4346
var comp0Ref = comp0.
ToMetadataReference
();
4359
var comp1Ref = comp1.
ToMetadataReference
();
4372
var comp2Ref = comp2.
ToMetadataReference
();
4464
var comp0Ref = comp0.
ToMetadataReference
();
4477
var comp1Ref = comp1.
ToMetadataReference
();
4490
var comp2Ref = comp2.
ToMetadataReference
();
4652
var comp0Ref = comp0.
ToMetadataReference
();
4665
var comp1Ref = comp1.
ToMetadataReference
();
4678
var comp2Ref = comp2.
ToMetadataReference
();
4905
var comp0Ref = comp0.
ToMetadataReference
();
4922
var comp1Ref = comp1.
ToMetadataReference
();
4995
var comp0Ref = comp0.
ToMetadataReference
();
5012
var comp1Ref = comp1.
ToMetadataReference
();
5055
var comp0Ref = comp0.
ToMetadataReference
();
5067
var comp1Ref = comp1.
ToMetadataReference
();
5142
var comp0Ref = comp0.
ToMetadataReference
();
5154
var comp1Ref = comp1.
ToMetadataReference
();
5400
var comp0Ref = comp0.
ToMetadataReference
();
5412
var comp1Ref = comp1.
ToMetadataReference
();
5461
var comp0Ref = comp0.
ToMetadataReference
();
5476
var comp1Ref = comp1.
ToMetadataReference
();
5487
var comp2Ref = comp2.
ToMetadataReference
();
5634
var comp1Ref = comp1.
ToMetadataReference
();
5678
var comp0Ref = comp0.
ToMetadataReference
();
5688
var comp1Ref = comp1.
ToMetadataReference
();
5716
var comp0Ref = comp0.
ToMetadataReference
();
5726
var comp1Ref = comp1.
ToMetadataReference
();
5755
var comp0Ref = comp0.
ToMetadataReference
();
5766
var comp1Ref = comp1.
ToMetadataReference
();
5806
MetadataReference comp0Ref = comp0.
ToMetadataReference
();
5843
MetadataReference comp0Ref = comp0.
ToMetadataReference
();
5878
MetadataReference comp0Ref = comp0.
ToMetadataReference
();
5916
var comp1Ref = comp1.
ToMetadataReference
().WithAliases(new[] { "N1C1" });
5928
var comp2Ref = comp2.
ToMetadataReference
();
5957
comp2Ref = comp2.
ToMetadataReference
().WithAliases(new[] { "N1C1" });
6007
var comp1Ref = comp1.
ToMetadataReference
().WithAliases(new[] { "N1C1" });
Symbols\AnonymousTypesSymbolTests.cs (2)
1799
var attributeLib = CreateEmptyCompilation(attributeSource, new[] { MinCorlibRef, stateLib.
ToMetadataReference
() });
1811
var comp = CreateEmptyCompilation(new[] { Parse(source), s_equalityComparerSourceTree }, new[] { MinCorlibRef, attributeLib.
ToMetadataReference
() });
Symbols\CheckedUserDefinedOperatorsTests.cs (10)
3443
var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.
ToMetadataReference
() });
3836
var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.
ToMetadataReference
() });
4218
var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.
ToMetadataReference
() });
4679
var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.
ToMetadataReference
() });
4798
var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.
ToMetadataReference
() });
5229
var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.
ToMetadataReference
() });
5697
var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.
ToMetadataReference
() });
6327
var compilation3 = CreateCompilationWithCSharp(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.
ToMetadataReference
() });
6432
var compilation3 = CreateCompilationWithCSharp(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.
ToMetadataReference
() });
6551
var compilation3 = CreateCompilationWithCSharp(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.
ToMetadataReference
() });
Symbols\CompilationCreationTests.cs (28)
716
new MetadataReference[] { NetFramework.mscorlib, varC_MTTestLib1_V1.
ToMetadataReference
() });
728
varC_MTTestLib2.
ToMetadataReference
(),
729
varC_MTTestLib1_V1.
ToMetadataReference
()
806
varC_MTTestLib2.
ToMetadataReference
(),
807
varC_MTTestLib1_V2.
ToMetadataReference
()
821
varC_MTTestLib2.
ToMetadataReference
(),
822
varC_MTTestLib1_V2.
ToMetadataReference
(),
823
varC_MTTestLib3.
ToMetadataReference
()
943
varC_MTTestLib2.
ToMetadataReference
(), varC_MTTestLib1_V3.
ToMetadataReference
(), varC_MTTestLib3.
ToMetadataReference
() });
957
varC_MTTestLib2.
ToMetadataReference
(),
958
varC_MTTestLib1_V3.
ToMetadataReference
(),
959
varC_MTTestLib3.
ToMetadataReference
(),
960
varC_MTTestLib4.
ToMetadataReference
()
1059
new MetadataReference[] { NetFramework.mscorlib, varC_MTTestLib3.
ToMetadataReference
() });
1068
new MetadataReference[] { NetFramework.mscorlib, varC_MTTestLib2.
ToMetadataReference
() });
1077
new MetadataReference[] { NetFramework.mscorlib, varC_MTTestLib2.
ToMetadataReference
(), varC_MTTestLib3.
ToMetadataReference
(), varC_MTTestLib4.
ToMetadataReference
() });
1145
new MetadataReference[] { NetFramework.mscorlib, varC_MTTestLib4.
ToMetadataReference
(), varC_MTTestLib2.
ToMetadataReference
(), varC_MTTestLib3.
ToMetadataReference
() });
1159
new MetadataReference[] { NetFramework.mscorlib, varC_MTTestLib4.
ToMetadataReference
() });
1170
varC_MTTestLib2.
ToMetadataReference
(),
1171
varC_MTTestLib1_V3.
ToMetadataReference
(),
1172
varC_MTTestLib3.
ToMetadataReference
(),
1173
varC_MTTestLib4.
ToMetadataReference
() });
Symbols\CorLibrary\CorTypes.cs (28)
341
var typeLib_v1_Comp = CreateEmptyCompilation(typeLib_v1, references: [corLib_v1_Comp.
ToMetadataReference
()], assemblyName: "typeLib");
352
source1, references: [corLib_v1_Comp.
ToMetadataReference
(), typeLib_v1_Comp.
ToMetadataReference
()],
390
var comp = CreateCompilation(source2, references: [corLib_v2_Comp.
ToMetadataReference
(), typeLib_v2_Comp.
ToMetadataReference
(), comp1Ref], options: TestOptions.DebugExe);
394
source1, references: [corLib_v1_Comp.
ToMetadataReference
(), typeLib_v1_Comp.
ToMetadataReference
()],
519
var typeLib_v1_Comp = CreateEmptyCompilation(typeLib_v1, references: [corLib_v1_Comp.
ToMetadataReference
()], assemblyName: "typeLib");
533
source1, references: [corLib_v1_Comp.
ToMetadataReference
(), typeLib_v1_Comp.
ToMetadataReference
()],
575
var comp = CreateCompilation(source2, references: [corLib_v2_Comp.
ToMetadataReference
(), typeLib_v2_Comp.
ToMetadataReference
(), comp1Ref], options: TestOptions.DebugExe);
579
source1, references: [corLib_v1_Comp.
ToMetadataReference
(), typeLib_v1_Comp.
ToMetadataReference
()],
785
var typeLib_v1_Comp = CreateEmptyCompilation(typeLib_v1, references: [corLib_v1_Comp.
ToMetadataReference
()], assemblyName: "typeLib");
806
source1, references: [corLib_v1_Comp.
ToMetadataReference
(), typeLib_v1_Comp.
ToMetadataReference
()],
856
var comp = CreateCompilation(source2, references: [corLib_v2_Comp.
ToMetadataReference
(), typeLib_v2_Comp.
ToMetadataReference
(), comp1Ref], options: TestOptions.DebugExe);
863
source1, references: [corLib_v1_Comp.
ToMetadataReference
(), typeLib_v1_Comp.
ToMetadataReference
()],
980
var typeLib_v1_Comp = CreateEmptyCompilation(typeLib_v1, references: [corLib_v1_Comp.
ToMetadataReference
()], assemblyName: "typeLib");
1001
source1, references: [corLib_v1_Comp.
ToMetadataReference
(), typeLib_v1_Comp.
ToMetadataReference
()],
1050
var comp = CreateCompilation(source2, references: [corLib_v2_Comp.
ToMetadataReference
(), typeLib_v2_Comp.
ToMetadataReference
(), comp1Ref], options: TestOptions.DebugExe);
1057
source1, references: [corLib_v1_Comp.
ToMetadataReference
(), typeLib_v1_Comp.
ToMetadataReference
()],
Symbols\CovariantReturnTests.cs (13)
460
CompilationReference compAsMetadata = comp.
ToMetadataReference
();
499
CompilationReference compAsMetadata = comp.
ToMetadataReference
();
3873
var baseMetadata = baseCompilation.
ToMetadataReference
();
3949
var baseMetadata = baseCompilation.
ToMetadataReference
();
4115
var baseMetadata = baseCompilation.
ToMetadataReference
();
4230
var baseMetadata = baseCompilation.
ToMetadataReference
();
4339
var baseMetadata = baseCompilation.
ToMetadataReference
();
4506
var baseMetadata = baseCompilation.
ToMetadataReference
();
4730
var baseMetadata = baseCompilation.
ToMetadataReference
();
4793
var baseMetadata = baseCompilation.
ToMetadataReference
();
4857
var baseMetadata = baseCompilation.
ToMetadataReference
();
4914
var baseMetadata = baseCompilation.
ToMetadataReference
();
4978
var baseMetadata = baseCompilation.
ToMetadataReference
();
Symbols\DefaultInterfaceImplementationTests.cs (243)
166
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
345
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
485
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
1622
var compilation3 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
1676
foreach (var reference in new[] { compilation1.EmitToImageReference(), compilation1.
ToMetadataReference
() })
1742
foreach (var reference in new[] { compilation1.EmitToImageReference(), compilation1.
ToMetadataReference
() })
1819
var compilation3 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
1910
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
1928
var compilation3 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
2181
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
2265
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
2267
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
2334
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
2336
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
2407
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
2409
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
2480
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
2482
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
2633
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
4277
var compilation3 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
4579
var compilation3 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
4675
var compilation3 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
4786
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
4802
var compilation3 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
5855
var compilation3 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
6126
var compilation3 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
6220
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
6236
var compilation3 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
6368
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
6598
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
7343
var compilation3 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
7559
var compilation3 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
7620
var compilation3 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
7696
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
7712
var compilation3 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
9280
foreach (var reference in new[] { compilation2.
ToMetadataReference
(), compilation2.EmitToImageReference() })
9470
foreach (var reference in new[] { compilation2.
ToMetadataReference
(), compilation2.EmitToImageReference() })
9543
var compilation3 = CreateCompilation(source2, new[] { compilation2.
ToMetadataReference
() }, options: TestOptions.DebugExe,
9842
var compilation3 = CreateCompilation(source2, new[] { compilation2.
ToMetadataReference
() }, options: TestOptions.DebugExe,
9907
var compilation3 = CreateCompilation(source2, new[] { compilation2.
ToMetadataReference
() }, options: TestOptions.DebugExe,
9992
foreach (var reference in new[] { compilation2.
ToMetadataReference
(), compilation2.EmitToImageReference() })
10050
var compilation3 = CreateCompilation(source2, new[] { compilation2.
ToMetadataReference
() }, options: TestOptions.DebugExe,
10058
compilation3 = CreateCompilation(source2, new[] { compilation2.
ToMetadataReference
() }, options: TestOptions.DebugExe,
10927
var compilation3 = CreateCompilation(source2, new[] { compilation2.
ToMetadataReference
() }, options: TestOptions.DebugExe,
10999
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
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() })
15674
var compilation3 = CreateCompilation(source2, new[] { compilation2.
ToMetadataReference
() }, options: TestOptions.DebugExe,
15755
var compilation3 = CreateCompilation(source2, new[] { compilation2.
ToMetadataReference
() }, options: TestOptions.DebugExe,
15862
foreach (var reference in new[] { compilation2.
ToMetadataReference
(), compilation2.EmitToImageReference() })
15969
var compilation3 = CreateCompilation(source2, new[] { compilation2.
ToMetadataReference
() }, options: TestOptions.DebugExe,
17527
var compilation3 = CreateCompilation(source2, new[] { compilation2.
ToMetadataReference
() }, options: TestOptions.DebugExe,
17619
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
18326
foreach (var reference in new[] { compilation2.
ToMetadataReference
(), compilation2.EmitToImageReference() })
18492
foreach (var reference in new[] { compilation2.
ToMetadataReference
(), compilation2.EmitToImageReference() })
19908
var compilation3 = CreateCompilation(source2, new[] { compilation2.
ToMetadataReference
() }, options: TestOptions.DebugExe,
19999
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
20424
foreach (var reference in new[] { compilation3.
ToMetadataReference
(), compilation3.EmitToImageReference() })
24538
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
26567
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
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() })
29183
var compilation3 = CreateCompilation(source2, new[] { compilation2.
ToMetadataReference
() }, options: TestOptions.DebugExe,
29267
var compilation3 = CreateCompilation(source2, new[] { compilation2.
ToMetadataReference
() }, options: TestOptions.DebugExe,
29374
foreach (var reference in new[] { compilation2.
ToMetadataReference
(), compilation2.EmitToImageReference() })
29474
var compilation3 = CreateCompilation(source2, new[] { compilation2.
ToMetadataReference
() }, options: TestOptions.DebugExe,
30930
var compilation3 = CreateCompilation(source2, new[] { compilation2.
ToMetadataReference
() }, options: TestOptions.DebugExe,
31020
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
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() })
32257
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe);
32547
foreach (var reference in new[] { compilation3.
ToMetadataReference
(), compilation3.EmitToImageReference() })
32975
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
33141
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
33227
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
33243
CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
33307
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
33386
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
34157
var compilation2 = CreateCompilation(source3, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
34194
var compilation5 = CreateCompilation(source2 + source3, new[] { compilation4.
ToMetadataReference
() }, options: TestOptions.DebugDll,
34311
var refs1 = new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() };
34499
var refs2 = new[] { compilation2.
ToMetadataReference
(), compilation2.EmitToImageReference() };
34689
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
34894
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
34973
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
35064
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
35165
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
35261
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
35366
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
35467
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
35469
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
35576
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
35578
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
35689
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
35691
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
35802
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
35804
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
35908
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
35910
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
36013
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
36015
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
36111
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
36113
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
36225
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
36227
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
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() })
37002
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: options,
37291
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
37391
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
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() };
39008
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
39175
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
39510
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
40032
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
40242
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
40333
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
40423
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
40511
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() },
41087
var compilation2 = CreateCompilation(source3, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
41128
var compilation5 = CreateCompilation(source2 + source3, new[] { compilation4.
ToMetadataReference
() }, options: TestOptions.DebugDll,
41267
var refs1 = new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() };
41498
var refs2 = new[] { compilation2.
ToMetadataReference
(), compilation2.EmitToImageReference() };
41674
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
41851
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, 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() })
43834
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
43971
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
44101
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
44218
var references = new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() };
45101
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
45254
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
45393
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
45585
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
45722
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugExe,
45899
foreach (var refs in new[] { (comp0:compilation0.
ToMetadataReference
(), comp1:compilation1.
ToMetadataReference
()),
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() })
46595
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
47022
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
47228
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
47320
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
47396
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
47468
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
47526
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
47607
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
47681
CompilationReference compilationReference0 = compilation0.
ToMetadataReference
();
47713
CompilationReference compilationReference3 = compilation3.
ToMetadataReference
();
47742
CompilationReference compilationReference6 = compilation6.
ToMetadataReference
();
47814
CompilationReference compilationReference0 = compilation0.
ToMetadataReference
();
47846
CompilationReference compilationReference3 = compilation3.
ToMetadataReference
();
47875
CompilationReference compilationReference6 = compilation6.
ToMetadataReference
();
47942
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
48009
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
48085
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
48142
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
48209
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
48306
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
48376
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
48440
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
48519
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
48591
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
48663
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
48733
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
48803
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
48896
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
48962
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
49069
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
49301
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
49541
CompilationReference compilationReference = compilation1.
ToMetadataReference
();
49658
foreach (var reference in new[] { compilation1.EmitToImageReference(), compilation1.
ToMetadataReference
() })
49774
foreach (var reference in new[] { compilation1.EmitToImageReference(), compilation1.
ToMetadataReference
() })
50369
var compilation1 = CreateCompilation(consumer, options: TestOptions.ReleaseDll, references: new[] { piaCompilation.
ToMetadataReference
(embedInteropTypes: true) }, targetFramework: TargetFramework.Net50);
50409
var compilation1 = CreateCompilation(consumer, options: TestOptions.ReleaseDll, references: new[] { piaCompilation.
ToMetadataReference
(embedInteropTypes: true) }, targetFramework: TargetFramework.Net50);
50450
var compilation1 = CreateCompilation(consumer, options: TestOptions.ReleaseDll, references: new[] { piaCompilation.
ToMetadataReference
(embedInteropTypes: true) }, targetFramework: TargetFramework.Net50);
50490
var compilation1 = CreateCompilation(consumer, options: TestOptions.ReleaseDll, references: new[] { piaCompilation.
ToMetadataReference
(embedInteropTypes: true) }, targetFramework: TargetFramework.Net50);
50530
var compilation1 = CreateCompilation(consumer, options: TestOptions.ReleaseDll, references: new[] { piaCompilation.
ToMetadataReference
(embedInteropTypes: true) }, targetFramework: TargetFramework.Net50);
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) })
50670
var compilation1 = CreateCompilation(consumer, options: TestOptions.ReleaseDll, references: new[] { piaCompilation.
ToMetadataReference
(embedInteropTypes: true) }, targetFramework: TargetFramework.Net50);
50753
var compilation1 = CreateCompilation(consumer1, options: TestOptions.ReleaseDll, references: baseReferences.Concat(new[] { piaCompilation.
ToMetadataReference
(embedInteropTypes: true) }), targetFramework: TargetFramework.Empty);
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() })
68529
var compilation3 = CreateCompilation(source3, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
68548
var compilation4 = CreateCompilation(source4, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
68592
compilation3 = CreateCompilation(source3, new[] { compilation1.
ToMetadataReference
() },
68605
compilation4 = CreateCompilation(source4, new[] { compilation1.
ToMetadataReference
() },
68688
var compilation2 = CreateCompilation(source2, new[] { compilation1.
ToMetadataReference
() }, options: TestOptions.DebugDll,
68864
foreach (var reference in new[] { compilation2.
ToMetadataReference
(), compilation2.EmitToImageReference() })
68949
foreach (var reference in new[] { compilation2.
ToMetadataReference
(), compilation2.EmitToImageReference() })
Symbols\ExtendedPartialMethodsTests.cs (7)
2089
verify(comp1.
ToMetadataReference
());
2235
verify(comp1.
ToMetadataReference
());
2242
references: new[] { comp1.
ToMetadataReference
() },
2278
verify(comp1.
ToMetadataReference
());
2321
verify(comp1.
ToMetadataReference
());
2362
verify(comp1.
ToMetadataReference
());
2483
verify(comp1.
ToMetadataReference
());
Symbols\ImplicitClassTests.cs (1)
41
var c2 = CreateCompilationWithMscorlib461("", new[] { c.
ToMetadataReference
() });
Symbols\Metadata\PE\NoPia.cs (2)
1386
var referencePIASource = compilationPIA.
ToMetadataReference
(embedInteropTypes: true);
1392
var referenceBaseSource = compilationBase.
ToMetadataReference
();
Symbols\ModuleInitializers\ModuleInitializersTests.cs (2)
1098
var ref1 = CreateCompilation(source1).
ToMetadataReference
(aliases: ImmutableArray.Create("Alias1"));
1099
var ref2 = CreateCompilation(source1).
ToMetadataReference
(aliases: ImmutableArray.Create("Alias2"));
Symbols\RelaxedShiftOperatorTests.cs (1)
54
var compilation2 = CreateCompilation(source1, options: TestOptions.DebugExe, references: new[] { compilation0.
ToMetadataReference
() },
Symbols\RequiredMembersTests.cs (42)
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() });
2203
var baseComp = CreateCompilationWithRequiredMembers(@base, new[] { originalC.
ToMetadataReference
() }, targetFramework: TargetFramework.Standard);
2217
var comp = CreateCompilation(code, new[] { baseComp.
ToMetadataReference
(), retargetedC.
ToMetadataReference
() }, targetFramework: TargetFramework.Standard);
2252
var originalCRef = originalC.
ToMetadataReference
();
2267
var baseRef = baseComp.
ToMetadataReference
();
2276
var comp = CreateCompilation(code, new[] { baseRef, derivedComp.
ToMetadataReference
(), retargetedC.
ToMetadataReference
() }, targetFramework: TargetFramework.Standard);
2298
var baseComp = CreateCompilationWithRequiredMembers(@base, new[] { originalC.
ToMetadataReference
() }, targetFramework: TargetFramework.Standard);
2312
var comp = CreateCompilation(code, new[] { baseComp.
ToMetadataReference
(), retargetedC.
ToMetadataReference
() }, targetFramework: TargetFramework.Standard);
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() });
2557
var baseComp = CreateCompilationWithRequiredMembers(@base, new[] { originalC.
ToMetadataReference
() }, targetFramework: TargetFramework.Standard);
2569
var comp = CreateCompilation(code, new[] { baseComp.
ToMetadataReference
(), retargetedC.
ToMetadataReference
() });
2588
var baseComp = CreateCompilationWithRequiredMembers(@base, new[] { originalC.
ToMetadataReference
() }, targetFramework: TargetFramework.Standard);
2600
var comp = CreateCompilation(code, new[] { baseComp.
ToMetadataReference
(), retargetedC.
ToMetadataReference
() });
5896
comp = CreateCompilation(code, references: new[] { useMetadataReference ? baseComp.
ToMetadataReference
() : baseComp.EmitToImageReference() });
5975
comp = CreateCompilation(code, references: new[] { useMetadataReference ? baseComp.
ToMetadataReference
() : baseComp.EmitToImageReference() });
6276
var reference = CreateCompilationWithRequiredMembers("").
ToMetadataReference
();
6295
var reference = CreateCompilationWithRequiredMembers("").
ToMetadataReference
();
Symbols\Retargeting\NoPia.cs (12)
1420
new MetadataReference[] { comp.
ToMetadataReference
() },
1465
new MetadataReference[] { comp.
ToMetadataReference
() },
1533
references: new MetadataReference[] { pia.
ToMetadataReference
(embedInteropTypes: true) });
1587
references: new MetadataReference[] { pia.
ToMetadataReference
(embedInteropTypes: true) });
1640
references: new MetadataReference[] { pia.
ToMetadataReference
(embedInteropTypes: true) });
1682
references: new MetadataReference[] { pia.
ToMetadataReference
(embedInteropTypes: true) });
1737
references: new MetadataReference[] { pia.
ToMetadataReference
(embedInteropTypes: true) });
1776
var lib = CreateCompilationWithMscorlib46(libSource, options: TestOptions.ReleaseDll, references: new[] { pia.
ToMetadataReference
() });
1805
references: new MetadataReference[] { pia.
ToMetadataReference
(embedInteropTypes: true), lib.
ToMetadataReference
() });
2663
foreach (MetadataReference piaRef in new[] { piaCompilation.EmitToImageReference(), piaCompilation.
ToMetadataReference
() })
2667
foreach (MetadataReference consumer1Ref in new[] { compilation1.EmitToImageReference(), compilation1.
ToMetadataReference
() })
Symbols\Retargeting\RetargetCustomAttributes.cs (5)
346
var comp2 = CreateCompilation(source2, references: new[] { comp1.
ToMetadataReference
() }, options: TestOptions.DebugDll);
347
var comp3 = CreateCompilation("", references: new[] { comp2.
ToMetadataReference
() }, options: TestOptions.DebugDll);
376
var comp2 = CreateCompilation(source2, references: new[] { comp1_1.
ToMetadataReference
() }, options: TestOptions.DebugDll);
389
var comp3 = CreateCompilation("", references: new[] { comp2.
ToMetadataReference
(), comp1_2.
ToMetadataReference
() }, options: TestOptions.DebugDll);
Symbols\Retargeting\RetargetExplicitInterfaceImplementation.cs (5)
450
var ref1 = CreateEmptyCompilation("").
ToMetadataReference
();
459
var compilation2 = CreateCompilation(source2, references: new[] { compilation1.
ToMetadataReference
(), ref1, CreateEmptyCompilation("").
ToMetadataReference
() });
461
var compilation3 = CreateCompilation("", references: new[] { compilation1.
ToMetadataReference
(), compilation2.
ToMetadataReference
() });
Symbols\Retargeting\RetargetingTests.cs (10)
936
var retargeted1Ref = retargeted1.
ToMetadataReference
();
938
var retargeted2Ref = retargeted2.
ToMetadataReference
();
941
var consistentRef = consistent.
ToMetadataReference
();
979
var retargetedComp = CreateCompilation("", references: new[] { originalComp.
ToMetadataReference
(), retargeted2Ref, consistentRef, ilRef },
1059
", new[] { beforeRetargeting.
ToMetadataReference
() });
1065
var finalComp = CreateEmptyCompilation(@"C.M(1);", options: TestOptions.ReleaseExe, references: new[] { afterRetargeting.
ToMetadataReference
(), unmanagedCallersOnlyAssembly.
ToMetadataReference
() });
1136
", new[] { beforeRetargeting.
ToMetadataReference
() });
1142
var finalComp = CreateEmptyCompilation(@"C.M(1);", options: TestOptions.ReleaseExe, references: new[] { afterRetargeting.
ToMetadataReference
(), unmanagedCallersOnlyAssembly.
ToMetadataReference
() });
Symbols\Source\FileModifierTests.cs (8)
4277
firstIsMetadataReference ? ref1.
ToMetadataReference
() : ref1.EmitToImageReference(),
4278
secondIsMetadataReference ? ref2.
ToMetadataReference
() : ref2.EmitToImageReference()
4376
var comp2 = CreateCompilation(source2, references: new[] { comp.
ToMetadataReference
() }, targetFramework: TargetFramework.Mscorlib461);
4419
var referencingMetadataComp = CreateCompilation("", new[] { comp.
ToMetadataReference
() });
4505
var reference = useMetadataReference ? comp0.
ToMetadataReference
() : comp0.EmitToImageReference();
4549
var reference = comp0.
ToMetadataReference
();
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\PropertyTests.cs (3)
2628
var compRef = refComp.
ToMetadataReference
(embedInteropTypes: false);
2664
compRef = refComp.
ToMetadataReference
(embedInteropTypes: true);
2721
compRef = refComp.
ToMetadataReference
(embedInteropTypes: true);
Symbols\Source\RecordTests.cs (1)
1355
emitReference ? comp.EmitToImageReference() : comp.
ToMetadataReference
()
Symbols\StaticAbstractMembersInInterfacesTests.cs (121)
6338
references: new[] { compilation1.
ToMetadataReference
() });
6470
references: new[] { compilation1.
ToMetadataReference
() });
6601
references: new[] { compilation1.
ToMetadataReference
() });
6719
references: new[] { compilation1.
ToMetadataReference
() });
6860
references: new[] { compilation1.
ToMetadataReference
() });
6989
references: new[] { compilation1.
ToMetadataReference
() });
8509
references: new[] { compilation1.
ToMetadataReference
() });
8594
references: new[] { compilation1.
ToMetadataReference
() });
9119
references: new[] { compilation1.
ToMetadataReference
() });
9187
references: new[] { compilation1.
ToMetadataReference
() });
9404
references: new[] { compilation1.
ToMetadataReference
() });
9457
references: new[] { compilation1.
ToMetadataReference
() });
9809
references: new[] { compilation1.
ToMetadataReference
() });
9871
references: new[] { compilation1.
ToMetadataReference
() });
12188
references: new[] { compilation1.
ToMetadataReference
() });
12251
references: new[] { compilation1.
ToMetadataReference
() });
12338
references: new[] { compilation1.
ToMetadataReference
() });
12388
references: new[] { compilation1.
ToMetadataReference
() });
12445
references: new[] { compilation1.
ToMetadataReference
() });
12558
references: new[] { compilation1.
ToMetadataReference
() });
12645
references: new[] { compilation1.
ToMetadataReference
() });
12745
references: new[] { compilation1.
ToMetadataReference
() });
13443
references: new[] { compilation1.
ToMetadataReference
() });
13495
references: new[] { compilation1.
ToMetadataReference
() });
13547
references: new[] { compilation1.
ToMetadataReference
() });
13602
references: new[] { compilation1.
ToMetadataReference
() });
13654
references: new[] { compilation1.
ToMetadataReference
() });
13706
references: new[] { compilation1.
ToMetadataReference
() });
14153
references: new[] { compilation1.
ToMetadataReference
() });
14202
references: new[] { compilation1.
ToMetadataReference
() });
14251
references: new[] { compilation1.
ToMetadataReference
() });
14303
references: new[] { compilation1.
ToMetadataReference
() });
14755
references: new[] { compilation1.
ToMetadataReference
() });
14804
references: new[] { compilation1.
ToMetadataReference
() });
15161
references: new[] { compilation1.
ToMetadataReference
() });
15210
references: new[] { compilation1.
ToMetadataReference
() });
15429
references: new[] { compilation1.
ToMetadataReference
() });
15478
references: new[] { compilation1.
ToMetadataReference
() });
15911
references: new[] { compilation1.
ToMetadataReference
() });
15967
references: new[] { compilation1.
ToMetadataReference
() });
16014
references: new[] { compilation1.
ToMetadataReference
() });
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() })
16839
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
16851
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
16921
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
16933
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
17003
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
17015
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
17073
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
17086
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
17148
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
17160
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
17235
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
17247
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
17325
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
17346
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
17431
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
17452
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
18778
references: new[] { compilation1.
ToMetadataReference
() });
18906
references: new[] { compilation1.
ToMetadataReference
() });
19066
references: new[] { compilation1.
ToMetadataReference
() });
19118
references: new[] { compilation1.
ToMetadataReference
() });
19170
references: new[] { compilation1.
ToMetadataReference
() });
19225
references: new[] { compilation1.
ToMetadataReference
() });
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() })
21677
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
21689
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
21786
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
21798
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
21888
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
21900
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
22755
references: new[] { compilation1.
ToMetadataReference
() });
22817
references: new[] { compilation1.
ToMetadataReference
() });
22873
references: new[] { compilation1.
ToMetadataReference
() });
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() })
24999
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
25011
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
25069
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
25082
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
25533
references: new[] { compilation1.
ToMetadataReference
() });
25601
references: new[] { compilation1.
ToMetadataReference
() });
25654
references: new[] { compilation1.
ToMetadataReference
() });
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() })
27665
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
27677
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
27735
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
27748
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
28425
references: new[] { compilation1.
ToMetadataReference
() });
28526
references: new[] { compilation1.
ToMetadataReference
() });
28578
references: new[] { compilation1.
ToMetadataReference
() });
28882
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
29507
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
29612
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
29624
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
29718
references: new[] { CreateCompilation("", targetFramework: _supportingFramework).
ToMetadataReference
() });
29730
foreach (var reference in new[] { compilation1.
ToMetadataReference
(), compilation1.EmitToImageReference() })
30523
references: new[] { compilation1.
ToMetadataReference
() });
30581
references: new[] { compilation1.
ToMetadataReference
() });
30638
references: new[] { compilation1.
ToMetadataReference
() });
30724
references: new[] { compilation1.
ToMetadataReference
() });
31774
references: new[] { CreateEmptyCompilation("").
ToMetadataReference
() });
31787
references: new[] { compilation0.
ToMetadataReference
() });
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() })
33660
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll, references: new[] { compilation1.
ToMetadataReference
() },
33717
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll, references: new[] { compilation1.
ToMetadataReference
() },
Symbols\SymbolErrorTests.cs (13)
20922
references: new MetadataReference[] { forwarderCompilation.
ToMetadataReference
() },
20987
references: new MetadataReference[] { forwarderCompilation.
ToMetadataReference
() },
21574
var comp2 = CreateCompilation(source2, references: new[] { comp1_v1.
ToMetadataReference
() });
21595
var comp1_v2 = CreateCompilation(source1_2, assemblyName: "Lib1", references: new[] { comp2Ref, comp3.
ToMetadataReference
() });
21622
var comp1_v4 = CreateCompilation(source1_4, assemblyName: "Lib1", references: new[] { comp2Ref, comp3.
ToMetadataReference
() });
21669
var comp2 = CreateCompilation(source2, references: new[] { comp1_v1.
ToMetadataReference
() });
21690
var comp1_v2 = CreateCompilation(source1_2, assemblyName: "Lib1", references: new[] { comp2Ref, comp3.
ToMetadataReference
() });
21717
var comp1_v4 = CreateCompilation(source1_4, assemblyName: "Lib1", references: new[] { comp2Ref, comp3.
ToMetadataReference
() });
21773
var comp2 = CreateCompilation(source2, references: new[] { comp1.
ToMetadataReference
() });
21846
var comp2 = CreateCompilation(source2, references: new[] { comp1.
ToMetadataReference
() });
21896
var comp2 = CreateCompilation(source2, references: new[] { comp1.
ToMetadataReference
() });
21943
var comp2 = CreateCompilation(new[] { string.Format(source2, "TypeForwarded_2"), string.Format(source2, "TypeForwardedTo"), source3 }, references: new[] { comp1.
ToMetadataReference
() });
22004
var comp2 = CreateCompilation(source2, references: new[] { comp1.
ToMetadataReference
() });
Symbols\TypeTests.cs (1)
743
var refAsm = CreateCompilation(refSource, assemblyName: "RefAsm").
ToMetadataReference
();
Symbols\UnsignedRightShiftTests.cs (7)
1993
var compilation2 = CreateCompilation(source1, options: TestOptions.DebugExe, references: new[] { compilation0.
ToMetadataReference
() },
2245
var compilation2 = CreateCompilation(source1, options: TestOptions.DebugExe, references: new[] { compilation0.
ToMetadataReference
() },
2280
var compilation2 = CreateCompilation(source1, options: TestOptions.DebugDll, references: new[] { compilation0.
ToMetadataReference
() },
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.Workspaces.UnitTests (1)
CodeGeneration\AddImportsTests.cs (1)
840
return compilation.
ToMetadataReference
();
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
CSharpDeterministicKeyBuilderTests.cs (1)
431
references: new[] { utilCompilation.
ToMetadataReference
() });
Microsoft.CodeAnalysis.UnitTests (4)
MetadataReferences\MetadataReferenceTests.cs (4)
341
var r = c.
ToMetadataReference
();
448
r = CS.CSharpCompilation.Create("compilation name").
ToMetadataReference
();
539
var c1a = CS.CSharpCompilation.Create("goo").
ToMetadataReference
();
541
var c2 = CS.CSharpCompilation.Create("goo").
ToMetadataReference
();
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\CompilationAPITests.vb (2)
1054
Dim csCompRef = csComp.
ToMetadataReference
(embedInteropTypes:=True)
1322
Dim compRef = csComp.
ToMetadataReference
()