Base:
method
ToMetadataReference
Microsoft.CodeAnalysis.Compilation.ToMetadataReference(System.Collections.Immutable.ImmutableArray<System.String>, System.Boolean)
1184 references to ToMetadataReference
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (183)
CodeGen\CodeGenAsyncMainTests.cs (4)
381var sourceCompilation = CreateEmptyCompilation(source, new[] { corCompilation.ToMetadataReference(), taskCompilation.ToMetadataReference() }, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1)); 421var sourceCompilation = CreateEmptyCompilation(source, new[] { corCompilation.ToMetadataReference(), taskCompilation.ToMetadataReference() }, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1));
CodeGen\CodeGenDeconstructTests.cs (4)
7864Handler", references: WinRtRefs.Concat(new[] { ValueTupleRef, comp1.ToMetadataReference() })); 7927Handler", references: WinRtRefs.Concat(new[] { ValueTupleRef, comp1.ToMetadataReference() })); 8476var lib = CreateCompilationWithMscorlib45(lib_cs, references: new[] { missing.ToMetadataReference() }, options: TestOptions.DebugDll); 8490var comp = CreateCompilationWithMscorlib45(source, references: new[] { lib.ToMetadataReference() }, options: TestOptions.DebugDll); // no ValueTuple reference
CodeGen\CodeGenFunctionPointersTests.cs (1)
8653validate(comp0.ToMetadataReference());
CodeGen\CodeGenInParametersTests.cs (5)
2766CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "9"); 2797CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "9"); 2828CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "9"); 2858CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "False"); 2888CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "3");
CodeGen\CodeGenReadonlyStructTests.cs (1)
1564var comp2 = CreateCompilation("", references: new[] { externalComp.ToMetadataReference() });
CodeGen\CodeGenTests.cs (1)
13492var comp = CreateCompilation(code, references: new[] { reference.ToMetadataReference() });
CodeGen\CodeGenTupleTest.cs (97)
353references: new[] { comp1.ToMetadataReference() }); 408references: new[] { SystemRuntimeFacadeRef, ValueTupleRef, comp1.ToMetadataReference() }); 1690var compLibCompilationRef = compLib.ToMetadataReference(); 3764references: new[] { ValueTupleRef, SystemRuntimeFacadeRef, missingComp.ToMetadataReference() }); 3768references: new[] { ValueTupleRef, SystemRuntimeFacadeRef, libComp.ToMetadataReference() }, parseOptions: TestOptions.Regular); 3780references: new[] { ValueTupleRef, SystemRuntimeFacadeRef, libComp.ToMetadataReference() }, parseOptions: TestOptions.Regular7_1); 5518var comp = CreateCompilationWithMscorlib40(source, references: new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference() }); 5527references: new[] { comp1.ToMetadataReference() }, 5809var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.ToMetadataReference() }); 5846var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.ToMetadataReference() }); 5863var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.ToMetadataReference() }); 5898var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.ToMetadataReference() }); 6044var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.ToMetadataReference() }); 6179var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.ToMetadataReference() }); 6357var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.ToMetadataReference() }); 6376var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.ToMetadataReference() }); 6536var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.ToMetadataReference() }); 13921var comp2CompilationRef = comp2.ToMetadataReference(); 14086var comp2CompilationRef = comp2.ToMetadataReference(); 14510var comp2 = CreateCompilationWithMscorlib40(source2, references: new[] { comp1.ToMetadataReference() }, 14778var consumer1 = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseExe, references: new[] { lib.ToMetadataReference() }); 15039var consumer1 = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseExe, references: new[] { lib.ToMetadataReference() }); 15425var consumer1 = CreateCompilationWithMscorlib46(source, options: TestOptions.ReleaseExe, references: new[] { lib.ToMetadataReference() }); 15686var consumer1 = CreateCompilationWithMscorlib46(source, options: TestOptions.ReleaseExe, references: new[] { lib.ToMetadataReference() }); 16773var comp1 = CreateCompilation(source, references: new[] { libComp.ToMetadataReference() }); 16798references: new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference() }, 16809references: new[] { comp2.ToMetadataReference(), comp1.ToMetadataReference() }, 16820references: new[] { comp2.ToMetadataReference(ImmutableArray.Create("alias")), comp1.ToMetadataReference() }, 16860references: new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference() }, 16871references: new[] { comp1.ToMetadataReference().WithAliases(ImmutableArray.Create("alias")), comp2.ToMetadataReference() }, 16892references: new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference().WithAliases(ImmutableArray.Create("alias1")) }, 16932references: new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference() }, 16946references: new[] { comp1.ToMetadataReference().WithAliases(ImmutableArray.Create("alias")), comp2.ToMetadataReference() }, 16967references: new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference().WithAliases(ImmutableArray.Create("alias1")) }, 17029references: s_valueTupleRefs.Concat(new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference().WithAliases(ImmutableArray.Create("alias1")) }), 17052references: s_valueTupleRefs.Concat(new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference().WithAliases(ImmutableArray.Create("alias1")) }), 17075comp1.ToMetadataReference(), 17076comp2.ToMetadataReference().WithAliases(ImmutableArray.Create("alias1")), 17130references: new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference().WithAliases(ImmutableArray.Create("alias1")) }, 17184references: new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference().WithAliases(ImmutableArray.Create("alias1")) }, 17486var comp = CompileAndVerifyWithMscorlib40(source, expectedOutput: "(1, 2)", references: new[] { tupleComp.ToMetadataReference() }); 18847var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.ToMetadataReference() }); 18865var comp = (Compilation)CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.ToMetadataReference() }); 18885var comp = (Compilation)CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.ToMetadataReference() }); 18908var comp = CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.ToMetadataReference() }); 18925var comp = (Compilation)CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp.ToMetadataReference() }); 18951var comp = (Compilation)CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp1.ToMetadataReference(), tupleComp2.ToMetadataReference() }); 18976var comp = (Compilation)CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp1.ToMetadataReference(), tupleComp2.ToMetadataReference() }); 19001var comp = (Compilation)CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp1.ToMetadataReference(), tupleComp2.ToMetadataReference() }); 19027var comp = (Compilation)CSharpCompilation.Create("test", references: new[] { MscorlibRef, tupleComp1.ToMetadataReference(), tupleComp2.ToMetadataReference() }); 19065var comp = (Compilation)CSharpCompilation.Create("test", syntaxTrees: new[] { tree }, references: new[] { (MetadataReference)Net40.mscorlib, tupleComp1.ToMetadataReference() }); 19104var comp = (Compilation)CSharpCompilation.Create("test", syntaxTrees: new[] { tree }, references: new[] { (MetadataReference)Net40.mscorlib, tupleComp1.ToMetadataReference() }); 19143var comp = (Compilation)CSharpCompilation.Create("test", syntaxTrees: new[] { tree }, references: new[] { MscorlibRef, tupleComp1.ToMetadataReference() }); 19182var comp = (Compilation)CSharpCompilation.Create("test", syntaxTrees: new[] { tree }, references: new[] { MscorlibRef, tupleComp1.ToMetadataReference() }); 22306var comp = CreateCompilationWithMscorlib40(source, references: new[] { lib.ToMetadataReference() }); 22346var comp = CreateCompilationWithMscorlib40(source, references: new[] { lib.ToMetadataReference() }); 22426references: new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference() }, 22513var comp = CreateCompilationWithMscorlib40(source, references: new[] { compLib.ToMetadataReference() }); 23478var comp = CompileAndVerify(source, expectedOutput: "42qq", references: new[] { libComp.ToMetadataReference() }, options: TestOptions.DebugExe, verify: Verification.Fails); 24889var comp2 = CreateCompilation(source2, references: new[] { comp1.ToMetadataReference() }); 26460var libRef = useImageReference ? lib.EmitToImageReference() : lib.ToMetadataReference(); 26504var missingContainerRef = useImageReference ? missingContainer.EmitToImageReference() : missingContainer.ToMetadataReference(); 26522var libRef = useImageReference ? lib.EmitToImageReference() : lib.ToMetadataReference(); 26567var missingContainerRef = useImageReference ? missingContainer.EmitToImageReference() : missingContainer.ToMetadataReference(); 26581var libRef = useImageReference ? lib.EmitToImageReference() : lib.ToMetadataReference(); 26628var missingRef = useImageReference ? missing.EmitToImageReference() : missing.ToMetadataReference(); 26646var libRef = useImageReference ? lib.EmitToImageReference() : lib.ToMetadataReference(); 26734var compWithMetadataReference = CreateEmptyCompilation(client_cs, references: new[] { MscorlibRef, lib.ToMetadataReference() }); // missing reference to vt 26900var compWithMetadataReference = CreateEmptyCompilation(client_cs, references: new[] { MscorlibRef, lib.ToMetadataReference() }); // missing reference to container 26975var compWithMetadataReference = CreateEmptyCompilation(client_cs, references: new[] { MscorlibRef, lib.ToMetadataReference() }); // missing reference to container 27081var comp1Ref = new[] { comp1.ToMetadataReference() }; 27165var comp1Ref = new[] { comp1.ToMetadataReference() }; 27239var comp1Ref = new[] { comp1.ToMetadataReference() }; 27317var comp1Ref = new[] { comp1.ToMetadataReference() }; 28015var comp3 = CreateCompilation("", references: new[] { comp.ToMetadataReference() }, targetFramework: TargetFramework.Mscorlib46); 28227var comp2 = CreateCompilation("", targetFramework: TargetFramework.Mscorlib46, references: new[] { comp.ToMetadataReference() }); 28341var comp2 = CreateCompilation("", targetFramework: TargetFramework.Mscorlib46, references: new[] { comp.ToMetadataReference() }); 28430var comp3 = CreateCompilation("", references: new[] { comp.ToMetadataReference() }, targetFramework: TargetFramework.Mscorlib46);
CodeGen\FixedSizeBufferTests.cs (1)
1155var comp3 = CreateCompilation("", references: new[] { comp.ToMetadataReference() }, targetFramework: TargetFramework.Mscorlib46);
Emit\CompilationEmitTests.cs (2)
1037var piaMetadataReference = pia.ToMetadataReference(embedInteropTypes: true); 1116var piaMetadataReference = pia.ToMetadataReference(embedInteropTypes: true);
Emit\EditAndContinue\AssemblyReferencesTests.cs (10)
211var compilation0 = CreateEmptyCompilation(src0, new[] { MscorlibRef, lib0.ToMetadataReference() }, assemblyName: "C", options: TestOptions.DebugDll); 212var compilation1 = compilation0.WithSource(src1).WithReferences(new[] { MscorlibRef, lib1.ToMetadataReference() }); 213var compilation2 = compilation1.WithSource(src2).WithReferences(new[] { MscorlibRef, lib2.ToMetadataReference() }); 315var compilation0 = CreateEmptyCompilation(src0, new[] { MscorlibRef, lib0.ToMetadataReference() }, assemblyName: "C", options: TestOptions.DebugDll); 316var compilation1 = compilation0.WithSource(src1).WithReferences(new[] { MscorlibRef, lib1.ToMetadataReference() }); 317var compilation2 = compilation1.WithSource(src2).WithReferences(new[] { MscorlibRef, lib2.ToMetadataReference() }); 471var ref01 = lib01.ToMetadataReference(ImmutableArray.Create("L0")); 474var ref02 = lib02.ToMetadataReference(ImmutableArray.Create("L0")); 477var ref11 = lib11.ToMetadataReference(ImmutableArray.Create("L1")); 480var ref12 = lib12.ToMetadataReference(ImmutableArray.Create("L1"));
Emit\EditAndContinue\EditAndContinueTests.cs (3)
11696var compilationB0 = CreateCompilation(sourceB0, new[] { compilationA0.ToMetadataReference() }, options: TestOptions.DebugDll, assemblyName: "LibB"); 11697var compilationB1 = CreateCompilation(sourceB1, new[] { compilationA1.ToMetadataReference() }, options: TestOptions.DebugDll, assemblyName: "LibB"); 11760var aRef = compilationA.ToMetadataReference();
Emit\EditAndContinue\SymbolMatcherTests.cs (2)
338var compilation0 = CreateCompilation(source, new[] { lib0.ToMetadataReference() }, options: TestOptions.DebugDll); 339var compilation1 = compilation0.WithSource(source).WithReferences(MscorlibRef, lib1.ToMetadataReference());
Emit\InAttributeModifierTests.cs (41)
42var verifier = CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 78CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 102CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 129CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 153CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 179CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 206CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 2525CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2572CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2627CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2675CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2722CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2767CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2812CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2857CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2902CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2947CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2992CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3038CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3084CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3130CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3176CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3224CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3272CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3327CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3375CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3423CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3469CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3515CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3561CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3607CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3653CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3686CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 3719CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 3762CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 3804CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 4193CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.ToMetadataReference() }, options: TestOptions.ReleaseExe, symbolValidator: validator); 4240CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.ToMetadataReference() }, options: TestOptions.ReleaseExe, symbolValidator: validator); 4289CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.ToMetadataReference() }, options: TestOptions.ReleaseExe, symbolValidator: validator); 4341CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.ToMetadataReference() }, options: TestOptions.ReleaseExe, symbolValidator: validator); 4394CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.ToMetadataReference() }, options: TestOptions.ReleaseExe, symbolValidator: validator);
Emit\NoPiaEmbedTypes.cs (6)
5067references: new MetadataReference[] { piaCompilation2.ToMetadataReference(embedInteropTypes: true), piaCompilation1.ToMetadataReference(), ValueTupleRef, SystemRuntimeFacadeRef }); 5071references: new MetadataReference[] { piaCompilation2.EmitToImageReference(embedInteropTypes: true), piaCompilation1.ToMetadataReference(), ValueTupleRef, SystemRuntimeFacadeRef }); 5075references: new MetadataReference[] { piaCompilation2.ToMetadataReference(), piaCompilation1.ToMetadataReference(), ValueTupleRef, SystemRuntimeFacadeRef }); 5079references: new MetadataReference[] { piaCompilation2.EmitToImageReference(), piaCompilation1.ToMetadataReference(), ValueTupleRef, SystemRuntimeFacadeRef });
PDB\PDBUsingTests.cs (5)
678compilation1.ToMetadataReference(), 680compilation1.ToMetadataReference(ImmutableArray.Create("X")) 731compilation1.ToMetadataReference(ImmutableArray.Create("X")), 733compilation1.ToMetadataReference(), 2309var comp2 = CreateCompilation(source2, new[] { comp1.ToMetadataReference() }, options: TestOptions.DebugExe);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (112)
Attributes\AttributeTests.cs (20)
122var newLibComp2 = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.ToMetadataReference() }, assemblyName: "lib"); 159var newLibComp2 = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.ToMetadataReference() }, assemblyName: "lib"); 199var newLibComp2 = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.ToMetadataReference() }, assemblyName: "lib"); 244var newLibComp2 = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.ToMetadataReference() }, assemblyName: "lib"); 282references: new[] { compWithReferenceToLib.ToMetadataReference(), newComp.ToMetadataReference() }, assemblyName: "lib"); 317var newLibComp2 = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.ToMetadataReference(), newComp.ToMetadataReference() }, assemblyName: "lib"); 392references: new[] { compWithReferenceToLib.ToMetadataReference(), newComp.ToMetadataReference() }, assemblyName: "lib"); 428var newLibComp2 = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.ToMetadataReference(), newComp.ToMetadataReference() }, assemblyName: "lib"); 463var newLibComp2 = CreateCompilation(newLib_cs, references: new[] { compWithReferenceToLib.ToMetadataReference(), newComp.ToMetadataReference() }, assemblyName: "lib"); 995CreateCompilation(usageSource, references: new[] { definitionComp.ToMetadataReference() }, options: WithNullableEnable()) 8155var comp1 = CreateCompilationWithMscorlib40(source2, assemblyName: "Temp0").ToMetadataReference(); 8180comp1 = CreateCompilationWithMscorlib40(source2, assemblyName: "Temp1").ToMetadataReference(); 8181var comp2 = CreateEmptyCompilation(source3, assemblyName: "Temp2").ToMetadataReference(); 10168var comp2 = CreateCompilation(source2, references: new[] { comp1.ToMetadataReference() }, parseOptions: TestOptions.Regular9); 10239var comp2 = CreateCompilation(source2, references: new[] { comp1.ToMetadataReference() }, parseOptions: TestOptions.Regular9);
Attributes\AttributeTests_Assembly.cs (1)
1519var defsRef = CreateCompilationWithMscorlib40(defaultHeaderString + s_defaultNetModuleSourceBody).ToMetadataReference();
Attributes\AttributeTests_Conditional.cs (2)
269CompileAndVerify(source2, references: new[] { comp1.ToMetadataReference() }, sourceSymbolValidator: CommonSourceValidatorForCondAttrType, symbolValidator: CommonMetadataValidatorForCondAttrType, expectedOutput: ""); 480CompileAndVerify(source2, references: new[] { comp1.ToMetadataReference() }, expectedOutput: s_commonExpectedOutput_ConditionalMethodsTest);
Attributes\AttributeTests_Dynamic.cs (1)
970var customRef = CreateCompilationWithMscorlib46(customDynamicAttrSource).ToMetadataReference();
Attributes\AttributeTests_Embedded.cs (4)
79CreateCompilation(code, references: new[] { reference.ToMetadataReference() }, assemblyName: "Source").VerifyDiagnostics( 159CreateCompilation(code, references: new[] { reference.ToMetadataReference() }).VerifyDiagnostics( 250}", assemblyName: "reference").ToMetadataReference(); 278}").ToMetadataReference();
Attributes\AttributeTests_IsByRefLike.cs (12)
137var referenceA = CreateCompilation(new[] { codeA, GetCompilerFeatureRequiredAttributeText(includeCompilerFeatureRequired) }).VerifyDiagnostics().ToMetadataReference(); 164var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 191var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 217var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 246var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 275var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 312var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 368}", references: new[] { code1.ToMetadataReference() }, options: options); 381}", references: new[] { code2.ToMetadataReference() }, options: options); 432}").ToMetadataReference(); 608var compilation_CompilationReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.ToMetadataReference(embedInteropTypes: true) }); 929CreateCompilation(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)
43Func<CSharpCompilation, MetadataReference> getReference = c => useImageReferences ? c.EmitToImageReference() : c.ToMetadataReference(); 108Func<CSharpCompilation, MetadataReference> getReference = c => useImageReferences ? c.EmitToImageReference() : c.ToMetadataReference(); 206Func<CSharpCompilation, MetadataReference> getReference = c => useImageReferences ? c.EmitToImageReference() : c.ToMetadataReference();
Attributes\AttributeTests_ReadOnlyStruct.cs (11)
127var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 154var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 181var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 207var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 236var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 265var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 302var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 358}", references: new[] { code1.ToMetadataReference() }, options: options); 371}", references: new[] { code2.ToMetadataReference() }, options: options); 422}").ToMetadataReference(); 600var compilation_CompilationReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.ToMetadataReference(embedInteropTypes: true) });
Attributes\AttributeTests_RefReadOnly.cs (25)
108var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 191var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 264var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 356var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 462var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 552var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 668var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 799var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 841var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 868var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 894var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 923var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 952var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 989var referenceA = CreateCompilation(codeA).VerifyDiagnostics().ToMetadataReference(); 1063}", references: new[] { code1.ToMetadataReference() }, options: options); 1076}", references: new[] { code2.ToMetadataReference() }, options: options); 1148}").ToMetadataReference(); 1327var 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)
3766CompileAndVerify(source2, references: new[] { compDll.ToMetadataReference() }, expectedOutput: expectedOutput); 3874CompileAndVerify(source2, references: new[] { compDll.ToMetadataReference() }, expectedOutput: expectedOutput); 3945CreateCompilation(source2, references: new[] { compDll.ToMetadataReference() }).VerifyDiagnostics( 4024CreateCompilation(source2, references: new[] { compDll.ToMetadataReference() }).VerifyDiagnostics( 4102CreateCompilation(source2, references: new[] { compDll.ToMetadataReference() }).VerifyDiagnostics( 4187CreateCompilation(source2, references: new[] { compDll.ToMetadataReference() }).VerifyDiagnostics( 4801var client1 = CreateCompilation("", references: new[] { lib_comp.ToMetadataReference() }); 8515verify(comp1.ToMetadataReference()); 8570verify(comp1.ToMetadataReference()); 8614verify(comp1.ToMetadataReference()); 8657verify(comp1.ToMetadataReference()); 8756verifyReference(comp1.ToMetadataReference(), options, expectedDiagnostics); 8809verify(comp1.ToMetadataReference()); 8857verify(comp1.ToMetadataReference()); 8936verify(comp1.ToMetadataReference()); 9091verify(comp1.ToMetadataReference()); 9420verify(comp1.ToMetadataReference());
Attributes\InternalsVisibleToAndStrongNameTests.cs (6)
1419references: new[] { comp.ToMetadataReference() }, 2921var comp = CreateCompilation(source1, new[] { lib.ToMetadataReference() }, assemblyName: "Issue57742_01"); 2956var comp = CreateCompilation(source1, new[] { lib.ToMetadataReference() }, assemblyName: "Issue57742_02"); 2997CompilationReference compilationReference = lib.ToMetadataReference(); 3121CompilationReference compilationReference = lib.ToMetadataReference(); 3188var comp = CreateCompilation(source1, new[] { lib.ToMetadataReference() }, assemblyName: "Issue57742_05");
Diagnostics\DiagnosticAnalyzerTests.cs (1)
1883var metadataReference = CreateCompilation(source).ToMetadataReference();
Emit\NumericIntPtrTests.cs (7)
938var ref1 = comp.ToMetadataReference(); 1000var ref1 = comp.ToMetadataReference(); 1193var ref1 = comp.ToMetadataReference(); 3022var ref1 = comp.ToMetadataReference(); 10299comp = CreateEmptyCompilation(source, references: new[] { corlib.ToMetadataReference() }, parseOptions: parseOptions); 10887var comp = CreateCompilation(source, references: new[] { libComp.ToMetadataReference() }, targetFramework: TargetFramework.Net70); 10918var comp = CreateEmptyCompilation(source, references: new[] { libComp.ToMetadataReference(), MscorlibRef_v46 });
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (6)
IOperation\IOperationTests_IArgument.cs (6)
1257var lib0 = CreateCompilation(source0).ToMetadataReference(); 1473var comp1 = CreateCompilation(source1, references: new[] { comp0.ToMetadataReference() }); 1519var comp1 = CreateCompilation(source1, references: new[] { comp0.ToMetadataReference() }); 1565var comp1 = CreateCompilation(source1, references: new[] { comp0.ToMetadataReference() }); 1610var comp1 = CreateCompilation(source1, references: new[] { comp0.ToMetadataReference() }); 1656var comp1 = CreateCompilation(source1, references: new[] { comp0.ToMetadataReference() });
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (1)
InteractiveSessionReferencesTests.cs (1)
532var portableLibRef = portableLib.ToMetadataReference();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (187)
Semantics\DelegateTypeTests.cs (12)
15491var comp2 = CreateCompilation(source2, new[] { comp1.ToMetadataReference() }); 15517var comp2 = CreateCompilation(source2, new[] { comp1.ToMetadataReference() }); 15603var comp2 = CreateCompilation(source2, new[] { comp1.ToMetadataReference() }); 15607comp2 = CreateCompilation(source2, new[] { comp1.ToMetadataReference() }); 15611comp2 = CreateCompilation(source2, new[] { comp1.ToMetadataReference() }); 15615comp2 = CreateCompilation(source2, new[] { comp1.ToMetadataReference() }); 15728var comp2 = CreateCompilation(source2, new[] { comp1.ToMetadataReference() }); 15758var comp2 = CreateCompilation(source2, new[] { comp1.ToMetadataReference() }); 15796var comp2 = CreateCompilation(source2, new[] { comp1.ToMetadataReference() }); 15800comp2 = CreateCompilation(source2, new[] { comp1.ToMetadataReference() }); 15804comp2 = CreateCompilation(source2, new[] { comp1.ToMetadataReference() }); 15868var comp2 = CreateCompilation(source2, new[] { comp1.ToMetadataReference() });
Semantics\ForEachTests.cs (3)
3411var comp2 = CreateEmptyCompilation(source2, new[] { comp1.ToMetadataReference() }, options: TestOptions.DebugDll); 3439var comp4 = CreateEmptyCompilation(source4, new[] { comp2.ToMetadataReference(), comp3.ToMetadataReference() });
Semantics\FunctionPointerTests.cs (1)
2098var comp = CreateCompilationWithIL("", il, references: new[] { cComp.ToMetadataReference() }, targetFramework: TargetFramework.NetCoreApp, options: TestOptions.UnsafeReleaseDll);
Semantics\GlobalUsingDirectiveTests.cs (19)
167var comp1Ref = comp1.ToMetadataReference().WithAliases(new[] { "alias1" }); 276var comp1Ref = comp1.ToMetadataReference().WithAliases(new[] { "alias1" }); 386var comp1Ref = comp1.ToMetadataReference().WithAliases(new[] { "alias1" }); 435var extCompRef = extComp.ToMetadataReference().WithAliases(new[] { "ext" }); 581var extCompRef = extComp.ToMetadataReference().WithAliases(new[] { "ext" }); 1140var extCompRef = extComp.ToMetadataReference().WithAliases(new[] { "ext" }); 1275var extCompRef = extComp.ToMetadataReference().WithAliases(new[] { "ext" }); 2045var comp1Ref = comp1.ToMetadataReference().WithAliases(new[] { "alias1", "alias2" }); 2195var comp1Ref = comp1.ToMetadataReference().WithAliases(new[] { "alias1" }); 3367CompilationReference newCompRef = newComp.ToMetadataReference(); 3369references: new[] { compWithReferenceToLib.ToMetadataReference(), newCompRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview); 3377references: new[] { compWithReferenceToLib.ToMetadataReference(), newCompRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview); 3389references: new[] { compWithReferenceToLib.ToMetadataReference(), newCompRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview); 3405references: new[] { compWithReferenceToLib.ToMetadataReference(), newCompRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview); 3421references: new[] { compWithReferenceToLib.ToMetadataReference(), newCompRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview); 3437references: new[] { compWithReferenceToLib.ToMetadataReference(), newCompRef }, assemblyName: "lib", parseOptions: TestOptions.RegularPreview); 3454var extCompRef = extComp.ToMetadataReference().WithAliases(new[] { "ext" }); 3645var extCompRef = extComp.ToMetadataReference().WithAliases(new[] { "ext" }); 4514var comp1Ref = comp1.ToMetadataReference().WithAliases(new[] { "A" });
Semantics\InitOnlyMemberTests.cs (19)
76references: new[] { useMetadataImage ? lib.EmitToImageReference() : lib.ToMetadataReference() }); 113references: new[] { useMetadataImage ? lib.EmitToImageReference() : lib.ToMetadataReference() }); 147references: new[] { useMetadataImage ? lib.EmitToImageReference() : lib.ToMetadataReference() }); 185references: new[] { useMetadataImage ? lib.EmitToImageReference() : lib.ToMetadataReference() }); 215references: new[] { useMetadataImage ? lib.EmitToImageReference() : lib.ToMetadataReference() }); 226references: new[] { useMetadataImage ? lib.EmitToImageReference() : lib.ToMetadataReference() }); 310var comp = CreateCompilation(source, parseOptions: TestOptions.Regular8, references: new[] { lib.ToMetadataReference() }, assemblyName: "comp"); 345references: new[] { useMetadataImage ? lib.EmitToImageReference() : lib.ToMetadataReference() }); 1044var comp = CreateCompilation(new[] { source, main }, references: new[] { emitImage ? libComp.EmitToImageReference() : libComp.ToMetadataReference() }, 1049comp = CreateCompilation(new[] { main }, references: new[] { emitImage ? libComp.EmitToImageReference() : libComp.ToMetadataReference() }, 1080var comp = CreateCompilation(new[] { main }, references: new[] { emitImage ? libComp.EmitToImageReference() : libComp.ToMetadataReference() }, 1128var comp = CreateCompilation(new[] { source, main }, references: new[] { emitImage ? libComp.EmitToImageReference() : libComp.ToMetadataReference() }, 1133comp = CreateCompilation(new[] { main }, references: new[] { emitImage ? libComp.EmitToImageReference() : libComp.ToMetadataReference() }, 1613references: new[] { emitImage ? libComp.EmitToImageReference() : libComp.ToMetadataReference() }, 1809references: new[] { emitAsImage ? libComp.EmitToImageReference() : libComp.ToMetadataReference() }); 2121references: new[] { emitAsImage ? libComp.EmitToImageReference() : libComp.ToMetadataReference() }); 2226references: new[] { emitAsImage ? libComp.EmitToImageReference() : libComp.ToMetadataReference() }); 3080references: new[] { emitAsImage ? libComp.EmitToImageReference() : libComp.ToMetadataReference() }, 4187var comp1Ref = new[] { comp1.ToMetadataReference() };
Semantics\InterpolationTests.cs (7)
1819foreach (var reference in new[] { comp1.EmitToImageReference(), comp1.ToMetadataReference() }) 2235foreach (var reference in new[] { comp1.EmitToImageReference(), comp1.ToMetadataReference() }) 7881CreateCompilation(@"C.M(1, " + expression + @");", new[] { comp.ToMetadataReference() }).VerifyDiagnostics( 7949comp = CreateCompilation(executableCode, new[] { dependency.ToMetadataReference() }); 8153foreach (var d in new[] { dependency.EmitToImageReference(), dependency.ToMetadataReference() }) 8210foreach (var d in new[] { dependency.EmitToImageReference(), dependency.ToMetadataReference() }) 8332foreach (var d in new[] { dependency.EmitToImageReference(), dependency.ToMetadataReference() })
Semantics\NativeIntegerTests.cs (20)
185var ref1 = comp.ToMetadataReference(); 701var ref1 = comp.ToMetadataReference(); 777var refA = comp.ToMetadataReference(); 858var refA = comp.ToMetadataReference(); 973var refA = comp.ToMetadataReference(); 1065var refB = comp.ToMetadataReference(); 1227var refA = comp.ToMetadataReference(); 1512var ref1 = comp.ToMetadataReference(); 1594var ref1 = comp.ToMetadataReference(); 1647var ref1 = comp.ToMetadataReference(); 3117var ref1 = comp.ToMetadataReference(); 3161var ref1 = comp.ToMetadataReference(); 3196var ref1 = comp.ToMetadataReference(); 3258var ref1 = comp.ToMetadataReference(); 3301var ref1 = comp.ToMetadataReference(); 3360var ref1 = comp.ToMetadataReference(); 3532var ref1 = comp.ToMetadataReference(); 3565var ref1 = comp.ToMetadataReference(); 3598var ref1 = comp.ToMetadataReference(); 7192var ref1 = comp.ToMetadataReference();
Semantics\NonTrailingNamedArgumentsTests.cs (1)
335var verifier1 = CompileAndVerify(source, expectedOutput: "1 2.", parseOptions: TestOptions.Regular7_2, references: new[] { lib.ToMetadataReference() });
Semantics\NullableReferenceTypesTests.cs (55)
8505var comp2 = CreateCompilation(new[] { client }, options: WithNullableEnable(), references: new[] { c.ToMetadataReference() }); 8522comp2 = CreateCompilation(new[] { client }, options: WithNullableEnable(), references: new[] { c.ToMetadataReference() }); 14324foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 14376foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 17146var comp2 = CreateCompilation(source2, references: new[] { comp1.ToMetadataReference() }, options: WithNullableEnable()); 59103" }, options: WithNullableEnable(), references: new MetadataReference[] { piaCompilation.ToMetadataReference(embedInteropTypes: true) }); 59154" }, options: WithNullableEnable(), references: new MetadataReference[] { piaCompilation.ToMetadataReference(embedInteropTypes: true) }); 73456references: new[] { c0.ToMetadataReference() }); 73497references: new[] { c0.ToMetadataReference() }); 73718c = CreateCompilation(new[] { source2 }, new[] { c1.ToMetadataReference() }, 73853c = CreateCompilation(new[] { source2 }, new[] { c1.ToMetadataReference() }, 73886c = CreateCompilation(new[] { source2 }, new[] { c1.ToMetadataReference() }, 74025c = CreateCompilation(new[] { source2 }, new[] { c1.ToMetadataReference() }, 74166c = CreateCompilation(new[] { source2 }, new[] { c1.ToMetadataReference() }, 74327c = CreateCompilation(new[] { source2 }, new[] { c1.ToMetadataReference() }, 94921var comp3 = CreateCompilation(new[] { source2 }, references: new[] { comp2.ToMetadataReference() }, options: WithNullable(NullableContextOptions.Warnings), parseOptions: TestOptions.Regular8); 94945var comp5 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), references: new[] { comp4.ToMetadataReference() }); 95609var comp3 = CreateCompilation(new[] { source2 }, references: new[] { comp2.ToMetadataReference() }, options: WithNullable(NullableContextOptions.Warnings), parseOptions: TestOptions.Regular8); 95633var comp5 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), references: new[] { comp4.ToMetadataReference() }); 95711var comp2 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), references: new[] { comp1.ToMetadataReference() }); 95728var comp4 = CreateCompilation(new[] { source2 }, options: WithNullableDisable(), references: new[] { comp1.ToMetadataReference() }); 95744var comp7 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), references: new[] { comp6.ToMetadataReference() }); 95747var comp9 = CreateCompilation(new[] { source2 }, options: WithNullableDisable(), references: new[] { comp6.ToMetadataReference() }); 96386var comp3 = CreateCompilation(new[] { source2 }, references: new[] { comp2.ToMetadataReference() }, options: WithNullable(NullableContextOptions.Warnings)); 96419var comp5 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), references: new[] { comp4.ToMetadataReference() }); 96431var comp6 = CreateCompilation(new[] { source2 }, references: new[] { comp4.ToMetadataReference() }); 96505var comp3 = CreateCompilation(new[] { source2 }, references: new[] { comp2.ToMetadataReference() }, options: WithNullable(NullableContextOptions.Warnings)); 96530var comp5 = CreateCompilation(new[] { source2 }, options: WithNullableEnable(), references: new[] { comp4.ToMetadataReference() }); 96536var comp6 = CreateCompilation(new[] { source2 }, references: new[] { comp4.ToMetadataReference() }); 97559foreach (var reference in new[] { comp1.ToMetadataReference(), comp1.EmitToImageReference() }) 97640foreach (var reference in new[] { comp1.ToMetadataReference(), comp1.EmitToImageReference() }) 102379foreach (var reference in new[] { comp1.ToMetadataReference(), comp1.EmitToImageReference() }) 105523foreach (var reference in new[] { comp0.ToMetadataReference(), comp0.EmitToImageReference() }) 107269MetadataReference ref0 = comp.ToMetadataReference(); 108912MetadataReference ref0 = comp0.ToMetadataReference(); 108931ref0 = comp0.ToMetadataReference(); 112434var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.ToMetadataReference() }); 112472var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.ToMetadataReference() }); 112509var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.ToMetadataReference() }); 112546var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.ToMetadataReference() }); 112588var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.ToMetadataReference() }); 112630var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.ToMetadataReference() }); 112671var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.ToMetadataReference() }); 112715var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.ToMetadataReference() }); 112756var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.ToMetadataReference() }); 112799var comp3 = CreateCompilation(source2, options: WithNullableEnable(), references: new[] { comp1.ToMetadataReference() }); 112917var compilation3 = CreateEmptyCompilation(source2, options: WithNullableEnable(TestOptions.ReleaseDll), references: new[] { compilation1.ToMetadataReference(), MinCorlibRef }); 112958var compilation5 = CreateEmptyCompilation(source2, options: WithNullableEnable(TestOptions.ReleaseDll), references: new[] { compilation1.ToMetadataReference() }); 113026var compilation7 = CreateEmptyCompilation(source2, options: WithNullableEnable(TestOptions.ReleaseDll), references: new[] { compilation1.ToMetadataReference(), MscorlibRef }); 140731references: new[] { spanRef, defComp.ToMetadataReference() }, 151453var nullableAttrRef = useImageReference ? nullableAttrComp.EmitToImageReference() : nullableAttrComp.ToMetadataReference(); 151472var libRef = useImageReference ? lib.EmitToImageReference() : lib.ToMetadataReference(); 155953" }, options: WithNullableEnable(), references: new MetadataReference[] { piaCompilation.ToMetadataReference(embedInteropTypes: true) }); 156004" }, options: WithNullableEnable(), references: new MetadataReference[] { piaCompilation.ToMetadataReference(embedInteropTypes: true) }); 156054" }, options: WithNullableEnable(), references: new MetadataReference[] { piaCompilation.ToMetadataReference(embedInteropTypes: true) });
Semantics\OverloadResolutionTests.cs (1)
11105CreateCompilation(code, references: new[] { libComp.ToMetadataReference() }).VerifyDiagnostics(
Semantics\RawInterpolationTests_Handler.cs (7)
214foreach (var reference in new[] { comp1.EmitToImageReference(), comp1.ToMetadataReference() }) 632foreach (var reference in new[] { comp1.EmitToImageReference(), comp1.ToMetadataReference() }) 6090CreateCompilation(@"C.M(1, " + expression + @");", new[] { comp.ToMetadataReference() }).VerifyDiagnostics( 6161comp = CreateCompilation(executableCode, new[] { dependency.ToMetadataReference() }); 6428foreach (var d in new[] { dependency.EmitToImageReference(), dependency.ToMetadataReference() }) 6487foreach (var d in new[] { dependency.EmitToImageReference(), dependency.ToMetadataReference() }) 6611foreach (var d in new[] { dependency.EmitToImageReference(), dependency.ToMetadataReference() })
Semantics\RecordStructTests.cs (2)
510var comp2 = CreateCompilation("", targetFramework: TargetFramework.Mscorlib46, references: new[] { comp.ToMetadataReference() }); 5055CompileAndVerify(source2, references: new[] { useImageReference ? comp1.EmitToImageReference() : comp1.ToMetadataReference() }, expectedOutput: @"
Semantics\RecordTests.cs (9)
9806var refA = useCompilationReference ? comp.ToMetadataReference() : comp.EmitToImageReference(); 10576var refA = useCompilationReference ? comp.ToMetadataReference() : comp.EmitToImageReference(); 12620var refA = useCompilationReference ? compA.ToMetadataReference() : compA.EmitToImageReference(); 13305var refA = compA.ToMetadataReference(); 20685CompileAndVerify(source2, references: new[] { useImageReference ? comp1.EmitToImageReference() : comp1.ToMetadataReference() }, expectedOutput: 20864references: new[] { emitRef ? comp.EmitToImageReference() : comp.ToMetadataReference() }, 21034references: new[] { emitRef ? comp.EmitToImageReference() : comp.ToMetadataReference() }, 23811var refA = useCompilationReference ? comp.ToMetadataReference() : comp.EmitToImageReference(); 30167var refA = useCompilationReference ? compA.ToMetadataReference() : compA.EmitToImageReference();
Semantics\RefEscapingTests.cs (2)
6775var comp1 = CreateCompilation(source1, references: new[] { comp0.ToMetadataReference() }, parseOptions: TestOptions.Regular11); 6785comp1 = CreateCompilation(source1, references: new[] { comp0.ToMetadataReference() }, parseOptions: TestOptions.Regular10);
Semantics\RefExtensionMethodsTests.cs (18)
395CompileAndVerify(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( 565CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "55"); 607}", references: new[] { reference.ToMetadataReference() }).VerifyDiagnostics( 651}", references: new[] { reference.ToMetadataReference() }).VerifyDiagnostics( 940CompileAndVerify(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( 2328references: new[] { reference.ToMetadataReference() }).VerifyDiagnostics( 2341CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 2432references: new[] { reference.ToMetadataReference() }).VerifyDiagnostics( 2445CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5");
Semantics\RefFieldTests.cs (3)
329var refA = comp.ToMetadataReference(); 11472var refA = comp.ToMetadataReference(); 22330var refA = comp.ToMetadataReference();
Semantics\ScriptSemanticsTests.cs (1)
89return taskCompilation.ToMetadataReference();
Semantics\StructConstructorTests.cs (2)
223var refA = comp.ToMetadataReference(); 3219var refA = comp.ToMetadataReference();
Semantics\UseSiteErrorTests.cs (5)
2323var compilation3 = CreateEmptyCompilation(source2, parseOptions: parseOptions, options: TestOptions.ReleaseDll, references: new[] { compilation1.ToMetadataReference(), MinCorlibRef }); 2364var compilation5 = CreateEmptyCompilation(source2, parseOptions: parseOptions, options: TestOptions.ReleaseDll, references: new[] { compilation1.ToMetadataReference() }); 2409var compilation7 = CreateEmptyCompilation(source2, parseOptions: parseOptions, options: TestOptions.ReleaseDll, references: new[] { compilation1.ToMetadataReference(), MscorlibRef }); 2452}", assemblyName: "libS1").ToMetadataReference(); 2459", references: new[] { UnmanagedUseSiteError_Ref1 }, assemblyName: "libS2").ToMetadataReference();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (687)
BadSymbolReference.cs (2)
806var comp3 = CreateEmptyCompilation(project3Source, new[] { MscorlibRef, comp1.ToMetadataReference(), comp2.ToMetadataReference() }, assemblyName: "Project3");
Compilation\CompilationAPITests.cs (8)
1181var compRef1 = comp1.ToMetadataReference(); 1182var compRef2 = comp2.ToMetadataReference(); 3418{accessibility} class C<T> {{}}", new[] { useMetadataReference ? referenceComp.ToMetadataReference() : referenceComp.EmitToImageReference() }); 3439{accessibility} class C<T> {{}}", new[] { useMetadataReference ? referenceComp.ToMetadataReference() : referenceComp.EmitToImageReference() }); 3467MetadataReference reference = useMetadataReference ? referenceComp.ToMetadataReference() : referenceComp.EmitToImageReference(); 3495MetadataReference reference = useMetadataReference ? referenceComp.ToMetadataReference() : referenceComp.EmitToImageReference(); 3542return useMetadataReference ? referenceComp1.ToMetadataReference() : referenceComp1.EmitToImageReference(); 3582return useMetadataReference ? referenceComp1.ToMetadataReference() : referenceComp1.EmitToImageReference();
Compilation\GetUnusedImportDirectivesTests.cs (4)
73var classLib2 = CreateCompilation(source: class2Source, assemblyName: "ClassLibrary2", references: new[] { classLib1.ToMetadataReference() }); 90var comp = CreateCompilation(tree, new[] { classLib1.ToMetadataReference(), classLib2.ToMetadataReference() }, assemblyName: "ConsoleApplication"); 245references: new[] { ivtCompilation.ToMetadataReference() },
Compilation\ReferenceManagerTests.cs (20)
51}", references: new MetadataReference[] { ifaceDef.ToMetadataReference(), wimpl }, 981var ref1 = lib1.ToMetadataReference(embedInteropTypes: true); 982var ref2 = lib2.ToMetadataReference(embedInteropTypes: false); 2249CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] public class C {}", new[] { MscorlibRef }, assemblyName: "C").ToMetadataReference(), 2266CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""0.0.0.0"")] public class C {}", new[] { MscorlibRef }, assemblyName: "C").ToMetadataReference(), 2267CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.1"")] public class C {}", new[] { MscorlibRef }, assemblyName: "C").ToMetadataReference(), 2268CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public class C {}", new[] { MscorlibRef }, assemblyName: "C").ToMetadataReference(), 2269CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] public class C {}", new[] { MscorlibRef }, assemblyName: "C").ToMetadataReference(), 2270CreateEmptyCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.1.0.0"")] public class C {}", new[] { MscorlibRef }, assemblyName: "C").ToMetadataReference(). 2291CreateCompilation(@"[assembly: System.Reflection.AssemblyVersion(""0.0.0.0"")] public class C {}", assemblyName: "C").ToMetadataReference(), 2292CreateCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.1"")] public class C {}", assemblyName: "C").ToMetadataReference(aliases: ImmutableArray.Create("X", "Y")), 2293CreateCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.0.0.0"")] public class C {}", assemblyName: "C").ToMetadataReference(), 2294CreateCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] public class C {}", assemblyName: "C").ToMetadataReference(), 2295CreateCompilation(@"[assembly: System.Reflection.AssemblyVersion(""1.1.0.0"")] public class C {}", assemblyName: "C").ToMetadataReference(). 2704var aRef = CreateCompilationWithMscorlib46("public interface A : D { }", new[] { dRef }, assemblyName: "A").ToMetadataReference(); 2720var aRef = CreateCompilationWithMscorlib46("public interface A : D { }", new[] { dRef }, assemblyName: "A").ToMetadataReference(); 2743var aRef = CreateCompilationWithMscorlib46("public interface A : D { }", new[] { bRef }, assemblyName: "A").ToMetadataReference(); 2745var eRef = CreateCompilationWithMscorlib46("public interface E { }", assemblyName: "E").ToMetadataReference(); 2769var aRef = CreateCompilationWithMscorlib46("public interface A : D { }", new[] { dRef }, assemblyName: "A").ToMetadataReference(); 2770var bRef = CreateCompilationWithMscorlib46("public interface B : D { }", new[] { dRef }, assemblyName: "B").ToMetadataReference();
Compilation\SemanticModelAPITests.cs (2)
90references: new[] { comp1.ToMetadataReference() }); 95references: new[] { comp1.ToMetadataReference() });
Compilation\UsedAssembliesTests.cs (119)
71verify<RetargetingAssemblySymbol>(source2, comp1.ToMetadataReference()); 398verify<SourceAssemblySymbol>(source2, comp1.ToMetadataReference()); 432verify<RetargetingAssemblySymbol>(source2, comp1.ToMetadataReference()); 455var comp1Ref = comp1.ToMetadataReference(); 507var comp0Ref = comp0.ToMetadataReference(); 521var comp1Ref = comp1.ToMetadataReference(); 577var comp0Ref = comp0.ToMetadataReference(); 685var comp1Ref = comp1.ToMetadataReference(); 747var comp0Ref = comp0.ToMetadataReference(); 766var comp1Ref = comp1.ToMetadataReference(); 947var comp0Ref = comp0.ToMetadataReference(); 966var comp1Ref = comp1.ToMetadataReference(); 1118var comp0Ref = comp0.ToMetadataReference(); 1132var comp1Ref = comp1.ToMetadataReference(); 1278var comp0Ref = comp0.ToMetadataReference(); 1292var comp1Ref = comp1.ToMetadataReference(); 1378verify<SourceAssemblySymbol>(source2, comp1.ToMetadataReference()); 1416var reference0 = comp0.ToMetadataReference(); 1417var reference1 = comp1.ToMetadataReference(); 1469var comp0Ref = comp0.ToMetadataReference(); 1479var comp1Ref = comp1.ToMetadataReference(); 1507var comp0Ref = comp0.ToMetadataReference(); 1517var comp1Ref = comp1.ToMetadataReference(); 1548var comp0Ref = comp0.ToMetadataReference(); 1560var comp1Ref = comp1.ToMetadataReference(); 1570var comp2Ref = comp2.ToMetadataReference(); 1628var comp5Ref = comp5.ToMetadataReference(embedInteropTypes: true); 1631var comp6Ref = comp6.ToMetadataReference(); 1635var comp7Ref = comp7.ToMetadataReference(embedInteropTypes: false); 1684var comp0Ref = comp0.ToMetadataReference(); 1694var comp1Ref = comp1.ToMetadataReference(); 1705var comp2Ref = comp2.ToMetadataReference(); 1737var comp0Ref = comp0.ToMetadataReference(); 1747var comp1Ref = comp1.ToMetadataReference(); 1757var comp2Ref = comp2.ToMetadataReference(); 1791var comp0Ref = comp0.ToMetadataReference(); 1803var comp1Ref = comp1.ToMetadataReference(); 1874var comp0Ref = comp0.ToMetadataReference(); 1886var comp1Ref = comp1.ToMetadataReference(); 1941var comp5Ref = comp5.ToMetadataReference(embedInteropTypes: true); 1944var comp6Ref = comp6.ToMetadataReference(); 1948var comp7Ref = comp7.ToMetadataReference(embedInteropTypes: false); 1969var comp1Ref = comp1.ToMetadataReference(); 2023var comp0Ref = comp0.ToMetadataReference(); 2033var comp1Ref = comp1.ToMetadataReference(); 2063var comp0Ref = comp0.ToMetadataReference(); 2074var comp1Ref = comp1.ToMetadataReference(); 2107var comp1Ref = comp1.ToMetadataReference(); 2167var comp1Ref = comp1.ToMetadataReference(); 2361var comp1Ref = comp1.ToMetadataReference(); 2428var comp0Ref = comp0.ToMetadataReference(embedInteropTypes: true); 2461var comp3Ref = comp3.ToMetadataReference(embedInteropTypes: false); 2496var comp0Ref = comp0.ToMetadataReference(embedInteropTypes: true); 2512var comp3Ref = comp3.ToMetadataReference(embedInteropTypes: false); 2584var comp0Ref = comp0.ToMetadataReference(embedInteropTypes: true); 2600var comp3Ref = comp3.ToMetadataReference(embedInteropTypes: false); 2672var comp0Ref = comp0.ToMetadataReference(embedInteropTypes: true); 2688var comp3Ref = comp3.ToMetadataReference(embedInteropTypes: false); 2756var comp0Ref = comp0.ToMetadataReference(embedInteropTypes: true); 2773var comp3Ref = comp3.ToMetadataReference(embedInteropTypes: false); 2845var comp0Ref = comp0.ToMetadataReference(embedInteropTypes: true); 2861var comp3Ref = comp3.ToMetadataReference(embedInteropTypes: false); 2933var comp0Ref = comp0.ToMetadataReference(embedInteropTypes: true); 2949var comp3Ref = comp3.ToMetadataReference(embedInteropTypes: false); 2997var comp0Ref = comp0.ToMetadataReference(embedInteropTypes: true); 3040var comp3Ref = comp3.ToMetadataReference(embedInteropTypes: false); 3306var comp0Ref = comp0.ToMetadataReference(embedInteropTypes: true); 3350var comp3Ref = comp3.ToMetadataReference(embedInteropTypes: false); 3557var comp0Ref = comp0.ToMetadataReference(); 3574var comp1Ref = comp1.ToMetadataReference(); 3650var comp0Ref = comp0.ToMetadataReference(); 3667var comp1Ref = comp1.ToMetadataReference(); 3758var comp0Ref = comp0.ToMetadataReference(); 3771var comp1Ref = comp1.ToMetadataReference(); 3834var comp0Ref = comp0.ToMetadataReference(); 3847var comp1Ref = comp1.ToMetadataReference(); 3949var comp0Ref = comp0.ToMetadataReference(); 3962var comp1Ref = comp1.ToMetadataReference(); 4053var comp0Ref = comp0.ToMetadataReference(); 4062var comp1Ref = comp1.ToMetadataReference(); 4168var comp0Ref = comp0.ToMetadataReference(); 4181var comp1Ref = comp1.ToMetadataReference(); 4194var comp2Ref = comp2.ToMetadataReference(); 4251var comp0Ref = comp0.ToMetadataReference(); 4264var comp1Ref = comp1.ToMetadataReference(); 4277var comp2Ref = comp2.ToMetadataReference(); 4369var comp0Ref = comp0.ToMetadataReference(); 4382var comp1Ref = comp1.ToMetadataReference(); 4395var comp2Ref = comp2.ToMetadataReference(); 4557var comp0Ref = comp0.ToMetadataReference(); 4570var comp1Ref = comp1.ToMetadataReference(); 4583var comp2Ref = comp2.ToMetadataReference(); 4810var comp0Ref = comp0.ToMetadataReference(); 4827var comp1Ref = comp1.ToMetadataReference(); 4900var comp0Ref = comp0.ToMetadataReference(); 4917var comp1Ref = comp1.ToMetadataReference(); 4960var comp0Ref = comp0.ToMetadataReference(); 4972var comp1Ref = comp1.ToMetadataReference(); 5047var comp0Ref = comp0.ToMetadataReference(); 5059var comp1Ref = comp1.ToMetadataReference(); 5305var comp0Ref = comp0.ToMetadataReference(); 5317var comp1Ref = comp1.ToMetadataReference(); 5364var comp0Ref = comp0.ToMetadataReference(); 5381var comp1Ref = comp1.ToMetadataReference(); 5392var comp2Ref = comp2.ToMetadataReference(); 5539var comp1Ref = comp1.ToMetadataReference(); 5583var comp0Ref = comp0.ToMetadataReference(); 5593var comp1Ref = comp1.ToMetadataReference(); 5621var comp0Ref = comp0.ToMetadataReference(); 5631var comp1Ref = comp1.ToMetadataReference(); 5660var comp0Ref = comp0.ToMetadataReference(); 5671var comp1Ref = comp1.ToMetadataReference(); 5711MetadataReference comp0Ref = comp0.ToMetadataReference(); 5748MetadataReference comp0Ref = comp0.ToMetadataReference(); 5783MetadataReference comp0Ref = comp0.ToMetadataReference(); 5821var comp1Ref = comp1.ToMetadataReference().WithAliases(new[] { "N1C1" }); 5833var comp2Ref = comp2.ToMetadataReference(); 5862comp2Ref = comp2.ToMetadataReference().WithAliases(new[] { "N1C1" }); 5912var comp1Ref = comp1.ToMetadataReference().WithAliases(new[] { "N1C1" });
Symbols\AnonymousTypesSymbolTests.cs (2)
1799var attributeLib = CreateEmptyCompilation(attributeSource, new[] { MinCorlibRef, stateLib.ToMetadataReference() }); 1811var comp = CreateEmptyCompilation(new[] { Parse(source), s_equalityComparerSourceTree }, new[] { MinCorlibRef, attributeLib.ToMetadataReference() });
Symbols\CheckedUserDefinedOperatorsTests.cs (10)
3443var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.ToMetadataReference() }); 3836var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.ToMetadataReference() }); 4218var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.ToMetadataReference() }); 4679var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.ToMetadataReference() }); 4798var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.ToMetadataReference() }); 5229var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.ToMetadataReference() }); 5697var compilation3 = CreateCompilation(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.ToMetadataReference() }); 6327var compilation3 = CreateCompilationWithCSharp(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.ToMetadataReference() }); 6432var compilation3 = CreateCompilationWithCSharp(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.ToMetadataReference() }); 6551var compilation3 = CreateCompilationWithCSharp(source2, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular10, references: new[] { compilation2.ToMetadataReference() });
Symbols\CompilationCreationTests.cs (28)
715new MetadataReference[] { Net451.mscorlib, varC_MTTestLib1_V1.ToMetadataReference() }); 727varC_MTTestLib2.ToMetadataReference(), 728varC_MTTestLib1_V1.ToMetadataReference() 805varC_MTTestLib2.ToMetadataReference(), 806varC_MTTestLib1_V2.ToMetadataReference() 820varC_MTTestLib2.ToMetadataReference(), 821varC_MTTestLib1_V2.ToMetadataReference(), 822varC_MTTestLib3.ToMetadataReference() 942varC_MTTestLib2.ToMetadataReference(), varC_MTTestLib1_V3.ToMetadataReference(), varC_MTTestLib3.ToMetadataReference() }); 956varC_MTTestLib2.ToMetadataReference(), 957varC_MTTestLib1_V3.ToMetadataReference(), 958varC_MTTestLib3.ToMetadataReference(), 959varC_MTTestLib4.ToMetadataReference() 1058new MetadataReference[] { Net451.mscorlib, varC_MTTestLib3.ToMetadataReference() }); 1067new MetadataReference[] { Net451.mscorlib, varC_MTTestLib2.ToMetadataReference() }); 1076new MetadataReference[] { Net451.mscorlib, varC_MTTestLib2.ToMetadataReference(), varC_MTTestLib3.ToMetadataReference(), varC_MTTestLib4.ToMetadataReference() }); 1144new MetadataReference[] { Net451.mscorlib, varC_MTTestLib4.ToMetadataReference(), varC_MTTestLib2.ToMetadataReference(), varC_MTTestLib3.ToMetadataReference() }); 1158new MetadataReference[] { Net451.mscorlib, varC_MTTestLib4.ToMetadataReference() }); 1169varC_MTTestLib2.ToMetadataReference(), 1170varC_MTTestLib1_V3.ToMetadataReference(), 1171varC_MTTestLib3.ToMetadataReference(), 1172varC_MTTestLib4.ToMetadataReference() });
Symbols\CovariantReturnTests.cs (13)
460CompilationReference compAsMetadata = comp.ToMetadataReference(); 499CompilationReference compAsMetadata = comp.ToMetadataReference(); 3873var baseMetadata = baseCompilation.ToMetadataReference(); 3949var baseMetadata = baseCompilation.ToMetadataReference(); 4115var baseMetadata = baseCompilation.ToMetadataReference(); 4230var baseMetadata = baseCompilation.ToMetadataReference(); 4339var baseMetadata = baseCompilation.ToMetadataReference(); 4506var baseMetadata = baseCompilation.ToMetadataReference(); 4730var baseMetadata = baseCompilation.ToMetadataReference(); 4793var baseMetadata = baseCompilation.ToMetadataReference(); 4857var baseMetadata = baseCompilation.ToMetadataReference(); 4914var baseMetadata = baseCompilation.ToMetadataReference(); 4978var baseMetadata = baseCompilation.ToMetadataReference();
Symbols\DefaultInterfaceImplementationTests.cs (243)
178foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 357var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 497var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 1634var compilation3 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 1688foreach (var reference in new[] { compilation1.EmitToImageReference(), compilation1.ToMetadataReference() }) 1754foreach (var reference in new[] { compilation1.EmitToImageReference(), compilation1.ToMetadataReference() }) 1831var compilation3 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 1922var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 1940var compilation3 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 2193var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 2277foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 2279var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 2346foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 2348var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 2419foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 2421var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 2492foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 2494var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 2645var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 4092var compilation3 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 4394var compilation3 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 4490var compilation3 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 4601var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 4617var compilation3 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 5670var compilation3 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 5941var compilation3 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 6035var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 6051var compilation3 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 6183var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 6413var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 7158var compilation3 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 7374var compilation3 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 7435var compilation3 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 7511var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 7527var compilation3 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 9095foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 9285foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 9358var compilation3 = CreateCompilation(source2, new[] { compilation2.ToMetadataReference() }, options: TestOptions.DebugExe, 9657var compilation3 = CreateCompilation(source2, new[] { compilation2.ToMetadataReference() }, options: TestOptions.DebugExe, 9722var compilation3 = CreateCompilation(source2, new[] { compilation2.ToMetadataReference() }, options: TestOptions.DebugExe, 9807foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 9865var compilation3 = CreateCompilation(source2, new[] { compilation2.ToMetadataReference() }, options: TestOptions.DebugExe, 9873compilation3 = CreateCompilation(source2, new[] { compilation2.ToMetadataReference() }, options: TestOptions.DebugExe, 10742var compilation3 = CreateCompilation(source2, new[] { compilation2.ToMetadataReference() }, options: TestOptions.DebugExe, 10814var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 11570foreach (var reference in new[] { compilation3.ToMetadataReference(), compilation3.EmitToImageReference() }) 11720foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 11835foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 11958foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 12049foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 12111foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 12173foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 12450foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 12538foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 12626foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 14771foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 14950foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 15076foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 15489var compilation3 = CreateCompilation(source2, new[] { compilation2.ToMetadataReference() }, options: TestOptions.DebugExe, 15570var compilation3 = CreateCompilation(source2, new[] { compilation2.ToMetadataReference() }, options: TestOptions.DebugExe, 15677foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 15784var compilation3 = CreateCompilation(source2, new[] { compilation2.ToMetadataReference() }, options: TestOptions.DebugExe, 17342var compilation3 = CreateCompilation(source2, new[] { compilation2.ToMetadataReference() }, options: TestOptions.DebugExe, 17434var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 18141foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 18307foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 19723var compilation3 = CreateCompilation(source2, new[] { compilation2.ToMetadataReference() }, options: TestOptions.DebugExe, 19814var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 20239foreach (var reference in new[] { compilation3.ToMetadataReference(), compilation3.EmitToImageReference() }) 24353var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 26382var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 28314foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 28455foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 28580foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 28998var compilation3 = CreateCompilation(source2, new[] { compilation2.ToMetadataReference() }, options: TestOptions.DebugExe, 29082var compilation3 = CreateCompilation(source2, new[] { compilation2.ToMetadataReference() }, options: TestOptions.DebugExe, 29189foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 29289var compilation3 = CreateCompilation(source2, new[] { compilation2.ToMetadataReference() }, options: TestOptions.DebugExe, 30745var compilation3 = CreateCompilation(source2, new[] { compilation2.ToMetadataReference() }, options: TestOptions.DebugExe, 30835var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 30981foreach (var reference in new[] { compilation3.ToMetadataReference(), compilation3.EmitToImageReference() }) 31837foreach (var reference in new[] { compilation3.ToMetadataReference(), compilation3.EmitToImageReference() }) 31971foreach (var reference in new[] { compilation3.ToMetadataReference(), compilation3.EmitToImageReference() }) 32072var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe); 32362foreach (var reference in new[] { compilation3.ToMetadataReference(), compilation3.EmitToImageReference() }) 32790var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 32956var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 33042var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 33058CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 33122var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 33201var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 33972var compilation2 = CreateCompilation(source3, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 34009var compilation5 = CreateCompilation(source2 + source3, new[] { compilation4.ToMetadataReference() }, options: TestOptions.DebugDll, 34126var refs1 = new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }; 34314var refs2 = new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }; 34504var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 34709var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 34788var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 34879var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 34980var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 35076var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 35181var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 35282foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 35284var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 35391foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 35393var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 35504foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 35506var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 35617foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 35619var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 35723foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 35725var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 35828foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 35830var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 35926foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 35928var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 36040foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 36042var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 36217foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 36242foreach (var reference in new[] { compilation4.ToMetadataReference(), compilation4.EmitToImageReference() }) 36405foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 36430foreach (var reference in new[] { compilation4.ToMetadataReference(), compilation4.EmitToImageReference() }) 36593foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 36618foreach (var reference in new[] { compilation4.ToMetadataReference(), compilation4.EmitToImageReference() }) 36817var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: options, 37106var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 37206var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 38233foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 38259foreach (var reference in new[] { compilation4.ToMetadataReference(), compilation4.EmitToImageReference() }) 38585var refs1 = new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }; 38651var refs2 = new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }; 38823var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 38990var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 39325var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 39847var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 40057var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 40148var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 40238var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 40326var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, 40902var compilation2 = CreateCompilation(source3, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 40943var compilation5 = CreateCompilation(source2 + source3, new[] { compilation4.ToMetadataReference() }, options: TestOptions.DebugDll, 41082var refs1 = new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }; 41313var refs2 = new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }; 41489var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 41666var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 41852foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 41879foreach (var reference in new[] { compilation4.ToMetadataReference(), compilation4.EmitToImageReference() }) 42056foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 42083foreach (var reference in new[] { compilation4.ToMetadataReference(), compilation4.EmitToImageReference() }) 42260foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 42287foreach (var reference in new[] { compilation4.ToMetadataReference(), compilation4.EmitToImageReference() }) 43649var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 43786var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 43916var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 44033var references = new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }; 44916var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 45069var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 45208var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 45400var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 45537var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugExe, 45714foreach (var refs in new[] { (comp0:compilation0.ToMetadataReference(), comp1:compilation1.ToMetadataReference()), 45847foreach (var reference in new[] { compilation0.ToMetadataReference(), compilation0.EmitToImageReference() }) 45973foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 46116foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 46410CompilationReference compilationReference = compilation1.ToMetadataReference(); 46837CompilationReference compilationReference = compilation1.ToMetadataReference(); 47043CompilationReference compilationReference = compilation1.ToMetadataReference(); 47135CompilationReference compilationReference = compilation1.ToMetadataReference(); 47211CompilationReference compilationReference = compilation1.ToMetadataReference(); 47283CompilationReference compilationReference = compilation1.ToMetadataReference(); 47341CompilationReference compilationReference = compilation1.ToMetadataReference(); 47422CompilationReference compilationReference = compilation1.ToMetadataReference(); 47496CompilationReference compilationReference0 = compilation0.ToMetadataReference(); 47528CompilationReference compilationReference3 = compilation3.ToMetadataReference(); 47557CompilationReference compilationReference6 = compilation6.ToMetadataReference(); 47629CompilationReference compilationReference0 = compilation0.ToMetadataReference(); 47661CompilationReference compilationReference3 = compilation3.ToMetadataReference(); 47690CompilationReference compilationReference6 = compilation6.ToMetadataReference(); 47757CompilationReference compilationReference = compilation1.ToMetadataReference(); 47824CompilationReference compilationReference = compilation1.ToMetadataReference(); 47900CompilationReference compilationReference = compilation1.ToMetadataReference(); 47957CompilationReference compilationReference = compilation1.ToMetadataReference(); 48024CompilationReference compilationReference = compilation1.ToMetadataReference(); 48121CompilationReference compilationReference = compilation1.ToMetadataReference(); 48191CompilationReference compilationReference = compilation1.ToMetadataReference(); 48255CompilationReference compilationReference = compilation1.ToMetadataReference(); 48334CompilationReference compilationReference = compilation1.ToMetadataReference(); 48406CompilationReference compilationReference = compilation1.ToMetadataReference(); 48478CompilationReference compilationReference = compilation1.ToMetadataReference(); 48548CompilationReference compilationReference = compilation1.ToMetadataReference(); 48618CompilationReference compilationReference = compilation1.ToMetadataReference(); 48711CompilationReference compilationReference = compilation1.ToMetadataReference(); 48777CompilationReference compilationReference = compilation1.ToMetadataReference(); 48884CompilationReference compilationReference = compilation1.ToMetadataReference(); 49116CompilationReference compilationReference = compilation1.ToMetadataReference(); 49356CompilationReference compilationReference = compilation1.ToMetadataReference(); 49473foreach (var reference in new[] { compilation1.EmitToImageReference(), compilation1.ToMetadataReference() }) 49589foreach (var reference in new[] { compilation1.EmitToImageReference(), compilation1.ToMetadataReference() }) 50184var compilation1 = CreateCompilation(consumer, options: TestOptions.ReleaseDll, references: new[] { piaCompilation.ToMetadataReference(embedInteropTypes: true) }, targetFramework: TargetFramework.Net50); 50224var compilation1 = CreateCompilation(consumer, options: TestOptions.ReleaseDll, references: new[] { piaCompilation.ToMetadataReference(embedInteropTypes: true) }, targetFramework: TargetFramework.Net50); 50265var compilation1 = CreateCompilation(consumer, options: TestOptions.ReleaseDll, references: new[] { piaCompilation.ToMetadataReference(embedInteropTypes: true) }, targetFramework: TargetFramework.Net50); 50305var compilation1 = CreateCompilation(consumer, options: TestOptions.ReleaseDll, references: new[] { piaCompilation.ToMetadataReference(embedInteropTypes: true) }, targetFramework: TargetFramework.Net50); 50345var compilation1 = CreateCompilation(consumer, options: TestOptions.ReleaseDll, references: new[] { piaCompilation.ToMetadataReference(embedInteropTypes: true) }, targetFramework: TargetFramework.Net50); 50390foreach (var reference in new[] { piaCompilation.ToMetadataReference(embedInteropTypes: true), piaCompilation.EmitToImageReference(embedInteropTypes: true) }) 50435foreach (var reference in new[] { piaCompilation.ToMetadataReference(embedInteropTypes: true), piaCompilation.EmitToImageReference(embedInteropTypes: true) }) 50485var compilation1 = CreateCompilation(consumer, options: TestOptions.ReleaseDll, references: new[] { piaCompilation.ToMetadataReference(embedInteropTypes: true) }, targetFramework: TargetFramework.Net50); 50568var compilation1 = CreateCompilation(consumer1, options: TestOptions.ReleaseDll, references: baseReferences.Concat(new[] { piaCompilation.ToMetadataReference(embedInteropTypes: true) }), targetFramework: TargetFramework.Empty); 50570foreach (var reference2 in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 50620foreach (var reference in new[] { piaCompilation.ToMetadataReference(embedInteropTypes: true), piaCompilation.EmitToImageReference(embedInteropTypes: true) }) 50883foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 51050foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 51194foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 51331foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 51478foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 51618foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 51724foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 52323foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 52519foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 52680foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 52847foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 53019foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 53181foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 53316foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 54013foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 57301foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 57477foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 57631foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 57786foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 57945foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 58094foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 58218foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 59065foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 66564foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 66744foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 68001foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 68341var compilation3 = CreateCompilation(source3, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 68360var compilation4 = CreateCompilation(source4, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 68404compilation3 = CreateCompilation(source3, new[] { compilation1.ToMetadataReference() }, 68417compilation4 = CreateCompilation(source4, new[] { compilation1.ToMetadataReference() }, 68500var compilation2 = CreateCompilation(source2, new[] { compilation1.ToMetadataReference() }, options: TestOptions.DebugDll, 68676foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() }) 68761foreach (var reference in new[] { compilation2.ToMetadataReference(), compilation2.EmitToImageReference() })
Symbols\ExtendedPartialMethodsTests.cs (7)
2021verify(comp1.ToMetadataReference()); 2167verify(comp1.ToMetadataReference()); 2174references: new[] { comp1.ToMetadataReference() }, 2210verify(comp1.ToMetadataReference()); 2253verify(comp1.ToMetadataReference()); 2294verify(comp1.ToMetadataReference()); 2415verify(comp1.ToMetadataReference());
Symbols\ImplicitClassTests.cs (1)
41var c2 = CreateCompilationWithMscorlib45("", new[] { c.ToMetadataReference() });
Symbols\Metadata\PE\NoPia.cs (2)
1386var referencePIASource = compilationPIA.ToMetadataReference(embedInteropTypes: true); 1392var referenceBaseSource = compilationBase.ToMetadataReference();
Symbols\ModuleInitializers\ModuleInitializersTests.cs (2)
1098var ref1 = CreateCompilation(source1).ToMetadataReference(aliases: ImmutableArray.Create("Alias1")); 1099var ref2 = CreateCompilation(source1).ToMetadataReference(aliases: ImmutableArray.Create("Alias2"));
Symbols\RelaxedShiftOperatorTests.cs (1)
54var compilation2 = CreateCompilation(source1, options: TestOptions.DebugExe, references: new[] { compilation0.ToMetadataReference() },
Symbols\RequiredMembersTests.cs (42)
527comp = CreateCompilation(derived, references: new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference() }); 569MetadataReference baseReference = useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference(); 573comp = CreateCompilation(derivedDerived, new[] { baseReference, useMetadataReference ? derivedComp.ToMetadataReference() : derivedComp.EmitToImageReference() }); 615comp = CreateCompilation(derived, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference() }); 666var baseReference = useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference(); 671comp = CreateCompilation(derivedDerived, new[] { baseReference, useMetadataReference ? derivedComp.ToMetadataReference() : derivedComp.EmitToImageReference() }); 745var baseReference = useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference(); 818comp = CreateCompilation("#pragma warning disable CS0649 // Never assigned" + derived, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference() }); 1624comp = CreateCompilation(creation, references: new[] { useMetadataReference ? cComp.ToMetadataReference() : cComp.EmitToImageReference() }); 1651comp = CreateCompilation(creation, references: new[] { useMetadataReference ? cComp.ToMetadataReference() : cComp.EmitToImageReference() }); 1694comp = CreateCompilation(creation, references: new[] { useMetadataReference ? cComp.ToMetadataReference() : cComp.EmitToImageReference() }); 1719comp = CreateCompilation(creation, references: new[] { useMetadataReference ? cComp.ToMetadataReference() : cComp.EmitToImageReference() }); 2009comp = CreateCompilation(code, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference() }); 2046var baseRef = useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference(); 2051comp = CreateCompilation(code, new[] { baseRef, useMetadataReference ? derivedComp.ToMetadataReference() : derivedComp.EmitToImageReference() }); 2103comp = CreateCompilation(code, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference() }); 2136comp = CreateCompilation(code, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference() }); 2167comp = CreateCompilation(code, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference() }); 2186var baseComp = CreateCompilationWithRequiredMembers(@base, new[] { originalC.ToMetadataReference() }, targetFramework: TargetFramework.Standard); 2200var comp = CreateCompilation(code, new[] { baseComp.ToMetadataReference(), retargetedC.ToMetadataReference() }, targetFramework: TargetFramework.Standard); 2235var originalCRef = originalC.ToMetadataReference(); 2250var baseRef = baseComp.ToMetadataReference(); 2259var comp = CreateCompilation(code, new[] { baseRef, derivedComp.ToMetadataReference(), retargetedC.ToMetadataReference() }, targetFramework: TargetFramework.Standard); 2281var baseComp = CreateCompilationWithRequiredMembers(@base, new[] { originalC.ToMetadataReference() }, targetFramework: TargetFramework.Standard); 2295var comp = CreateCompilation(code, new[] { baseComp.ToMetadataReference(), retargetedC.ToMetadataReference() }, targetFramework: TargetFramework.Standard); 2335comp = CreateCompilation(code, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference() }); 2370comp = CreateCompilation(code, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference() }); 2409comp = CreateCompilation(code, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference() }); 2441comp = CreateCompilation(code, new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference() }); 2458var baseComp = CreateCompilationWithRequiredMembers(@base, new[] { originalC.ToMetadataReference() }, targetFramework: TargetFramework.Standard); 2470var comp = CreateCompilation(code, new[] { baseComp.ToMetadataReference(), retargetedC.ToMetadataReference() }); 2489var baseComp = CreateCompilationWithRequiredMembers(@base, new[] { originalC.ToMetadataReference() }, targetFramework: TargetFramework.Standard); 2501var comp = CreateCompilation(code, new[] { baseComp.ToMetadataReference(), retargetedC.ToMetadataReference() }); 5267comp = CreateCompilation(code, references: new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference() }); 5346comp = CreateCompilation(code, references: new[] { useMetadataReference ? baseComp.ToMetadataReference() : baseComp.EmitToImageReference() }); 5521var reference = CreateCompilationWithRequiredMembers("").ToMetadataReference(); 5540var reference = CreateCompilationWithRequiredMembers("").ToMetadataReference();
Symbols\Retargeting\NoPia.cs (12)
1419new MetadataReference[] { comp.ToMetadataReference() }, 1464new MetadataReference[] { comp.ToMetadataReference() }, 1532references: new MetadataReference[] { pia.ToMetadataReference(embedInteropTypes: true) }); 1586references: new MetadataReference[] { pia.ToMetadataReference(embedInteropTypes: true) }); 1639references: new MetadataReference[] { pia.ToMetadataReference(embedInteropTypes: true) }); 1681references: new MetadataReference[] { pia.ToMetadataReference(embedInteropTypes: true) }); 1736references: new MetadataReference[] { pia.ToMetadataReference(embedInteropTypes: true) }); 1775var lib = CreateCompilationWithMscorlib46(libSource, options: TestOptions.ReleaseDll, references: new[] { pia.ToMetadataReference() }); 1804references: new MetadataReference[] { pia.ToMetadataReference(embedInteropTypes: true), lib.ToMetadataReference() }); 2662foreach (MetadataReference piaRef in new[] { piaCompilation.EmitToImageReference(), piaCompilation.ToMetadataReference() }) 2666foreach (MetadataReference consumer1Ref in new[] { compilation1.EmitToImageReference(), compilation1.ToMetadataReference() })
Symbols\Retargeting\RetargetCustomAttributes.cs (5)
345var comp2 = CreateCompilation(source2, references: new[] { comp1.ToMetadataReference() }, options: TestOptions.DebugDll); 346var comp3 = CreateCompilation("", references: new[] { comp2.ToMetadataReference() }, options: TestOptions.DebugDll); 375var comp2 = CreateCompilation(source2, references: new[] { comp1_1.ToMetadataReference() }, options: TestOptions.DebugDll); 388var comp3 = CreateCompilation("", references: new[] { comp2.ToMetadataReference(), comp1_2.ToMetadataReference() }, options: TestOptions.DebugDll);
Symbols\Retargeting\RetargetExplicitInterfaceImplementation.cs (5)
451var ref1 = CreateEmptyCompilation("").ToMetadataReference(); 460var compilation2 = CreateCompilation(source2, references: new[] { compilation1.ToMetadataReference(), ref1, CreateEmptyCompilation("").ToMetadataReference() }); 462var compilation3 = CreateCompilation("", references: new[] { compilation1.ToMetadataReference(), compilation2.ToMetadataReference() });
Symbols\Retargeting\RetargetingTests.cs (10)
936var retargeted1Ref = retargeted1.ToMetadataReference(); 938var retargeted2Ref = retargeted2.ToMetadataReference(); 941var consistentRef = consistent.ToMetadataReference(); 979var retargetedComp = CreateCompilation("", references: new[] { originalComp.ToMetadataReference(), retargeted2Ref, consistentRef, ilRef }, 1059", new[] { beforeRetargeting.ToMetadataReference() }); 1065var finalComp = CreateEmptyCompilation(@"C.M(1);", options: TestOptions.ReleaseExe, references: new[] { afterRetargeting.ToMetadataReference(), unmanagedCallersOnlyAssembly.ToMetadataReference() }); 1136", new[] { beforeRetargeting.ToMetadataReference() }); 1142var finalComp = CreateEmptyCompilation(@"C.M(1);", options: TestOptions.ReleaseExe, references: new[] { afterRetargeting.ToMetadataReference(), unmanagedCallersOnlyAssembly.ToMetadataReference() });
Symbols\Source\FileModifierTests.cs (5)
3689firstIsMetadataReference ? ref1.ToMetadataReference() : ref1.EmitToImageReference(), 3690secondIsMetadataReference ? ref2.ToMetadataReference() : ref2.EmitToImageReference() 3779var referencingMetadataComp = CreateCompilation("", new[] { comp.ToMetadataReference() }); 3865var reference = useMetadataReference ? comp0.ToMetadataReference() : comp0.EmitToImageReference(); 3909var reference = comp0.ToMetadataReference();
Symbols\Source\PropertyTests.cs (3)
2628var compRef = refComp.ToMetadataReference(embedInteropTypes: false); 2664compRef = refComp.ToMetadataReference(embedInteropTypes: true); 2721compRef = refComp.ToMetadataReference(embedInteropTypes: true);
Symbols\Source\RecordTests.cs (1)
1355emitReference ? comp.EmitToImageReference() : comp.ToMetadataReference()
Symbols\StaticAbstractMembersInInterfacesTests.cs (119)
6338references: new[] { compilation1.ToMetadataReference() }); 6470references: new[] { compilation1.ToMetadataReference() }); 6601references: new[] { compilation1.ToMetadataReference() }); 6719references: new[] { compilation1.ToMetadataReference() }); 6860references: new[] { compilation1.ToMetadataReference() }); 6989references: new[] { compilation1.ToMetadataReference() }); 8509references: new[] { compilation1.ToMetadataReference() }); 8594references: new[] { compilation1.ToMetadataReference() }); 9119references: new[] { compilation1.ToMetadataReference() }); 9187references: new[] { compilation1.ToMetadataReference() }); 9404references: new[] { compilation1.ToMetadataReference() }); 9457references: new[] { compilation1.ToMetadataReference() }); 9809references: new[] { compilation1.ToMetadataReference() }); 9871references: new[] { compilation1.ToMetadataReference() }); 12188references: new[] { compilation1.ToMetadataReference() }); 12251references: new[] { compilation1.ToMetadataReference() }); 12338references: new[] { compilation1.ToMetadataReference() }); 12388references: new[] { compilation1.ToMetadataReference() }); 12445references: new[] { compilation1.ToMetadataReference() }); 12558references: new[] { compilation1.ToMetadataReference() }); 12645references: new[] { compilation1.ToMetadataReference() }); 12745references: new[] { compilation1.ToMetadataReference() }); 13455references: new[] { compilation1.ToMetadataReference() }); 13507references: new[] { compilation1.ToMetadataReference() }); 13559references: new[] { compilation1.ToMetadataReference() }); 13614references: new[] { compilation1.ToMetadataReference() }); 13666references: new[] { compilation1.ToMetadataReference() }); 13718references: new[] { compilation1.ToMetadataReference() }); 14177references: new[] { compilation1.ToMetadataReference() }); 14226references: new[] { compilation1.ToMetadataReference() }); 14275references: new[] { compilation1.ToMetadataReference() }); 14327references: new[] { compilation1.ToMetadataReference() }); 14779references: new[] { compilation1.ToMetadataReference() }); 14828references: new[] { compilation1.ToMetadataReference() }); 15185references: new[] { compilation1.ToMetadataReference() }); 15234references: new[] { compilation1.ToMetadataReference() }); 15453references: new[] { compilation1.ToMetadataReference() }); 15502references: new[] { compilation1.ToMetadataReference() }); 15935references: new[] { compilation1.ToMetadataReference() }); 15991references: new[] { compilation1.ToMetadataReference() }); 16038references: new[] { compilation1.ToMetadataReference() }); 16214foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 16695foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 16783foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 16863references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 16875foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 16945references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 16957foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 17027references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 17039foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 17097references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 17110foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 17172references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 17184foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 17259references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 17271foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 17349references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 17370foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 17455references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 17476foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 18802references: new[] { compilation1.ToMetadataReference() }); 18930references: new[] { compilation1.ToMetadataReference() }); 19090references: new[] { compilation1.ToMetadataReference() }); 19142references: new[] { compilation1.ToMetadataReference() }); 19194references: new[] { compilation1.ToMetadataReference() }); 19249references: new[] { compilation1.ToMetadataReference() }); 19942foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 20016foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 20099foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 20179foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 21307foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 21367foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 21470foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 21590foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 21701references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 21713foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 21810references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 21822foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 21912references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 21924foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 22779references: new[] { compilation1.ToMetadataReference() }); 22841references: new[] { compilation1.ToMetadataReference() }); 22897references: new[] { compilation1.ToMetadataReference() }); 23232foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 24793foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 24908foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 25023references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 25035foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 25093references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 25106foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 25557references: new[] { compilation1.ToMetadataReference() }); 25625references: new[] { compilation1.ToMetadataReference() }); 25678references: new[] { compilation1.ToMetadataReference() }); 25919foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 27458foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 27573foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 27689references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 27701foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 27759references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 27772foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 28449references: new[] { compilation1.ToMetadataReference() }); 28550references: new[] { compilation1.ToMetadataReference() }); 28602references: new[] { compilation1.ToMetadataReference() }); 28906foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 29531foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 29636references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 29648foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 29742references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() }); 29754foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 30547references: new[] { compilation1.ToMetadataReference() }); 30605references: new[] { compilation1.ToMetadataReference() }); 30662references: new[] { compilation1.ToMetadataReference() }); 30748references: new[] { compilation1.ToMetadataReference() }); 31798references: new[] { CreateEmptyCompilation("").ToMetadataReference() }); 31811references: new[] { compilation0.ToMetadataReference() }); 33118foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 33185foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 33252foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() }) 33319foreach (var reference in new[] { compilation1.ToMetadataReference(), compilation1.EmitToImageReference() })
Symbols\SymbolErrorTests.cs (13)
20817references: new MetadataReference[] { forwarderCompilation.ToMetadataReference() }, 20882references: new MetadataReference[] { forwarderCompilation.ToMetadataReference() }, 21469var comp2 = CreateCompilation(source2, references: new[] { comp1_v1.ToMetadataReference() }); 21490var comp1_v2 = CreateCompilation(source1_2, assemblyName: "Lib1", references: new[] { comp2Ref, comp3.ToMetadataReference() }); 21517var comp1_v4 = CreateCompilation(source1_4, assemblyName: "Lib1", references: new[] { comp2Ref, comp3.ToMetadataReference() }); 21564var comp2 = CreateCompilation(source2, references: new[] { comp1_v1.ToMetadataReference() }); 21585var comp1_v2 = CreateCompilation(source1_2, assemblyName: "Lib1", references: new[] { comp2Ref, comp3.ToMetadataReference() }); 21612var comp1_v4 = CreateCompilation(source1_4, assemblyName: "Lib1", references: new[] { comp2Ref, comp3.ToMetadataReference() }); 21668var comp2 = CreateCompilation(source2, references: new[] { comp1.ToMetadataReference() }); 21741var comp2 = CreateCompilation(source2, references: new[] { comp1.ToMetadataReference() }); 21791var comp2 = CreateCompilation(source2, references: new[] { comp1.ToMetadataReference() }); 21838var comp2 = CreateCompilation(new[] { string.Format(source2, "TypeForwarded_2"), string.Format(source2, "TypeForwardedTo"), source3 }, references: new[] { comp1.ToMetadataReference() }); 21899var comp2 = CreateCompilation(source2, references: new[] { comp1.ToMetadataReference() });
Symbols\TypeTests.cs (1)
742var refAsm = CreateCompilation(refSource, assemblyName: "RefAsm").ToMetadataReference();
Symbols\UnsignedRightShiftTests.cs (7)
1993var compilation2 = CreateCompilation(source1, options: TestOptions.DebugExe, references: new[] { compilation0.ToMetadataReference() }, 2245var compilation2 = CreateCompilation(source1, options: TestOptions.DebugExe, references: new[] { compilation0.ToMetadataReference() }, 2280var compilation2 = CreateCompilation(source1, options: TestOptions.DebugDll, references: new[] { compilation0.ToMetadataReference() }, 3443foreach (var reference in new[] { compilation0.ToMetadataReference(), compilation0.EmitToImageReference() }) 3495foreach (var reference in new[] { compilation0.ToMetadataReference(), compilation0.EmitToImageReference() }) 3547foreach (var reference in new[] { compilation0.ToMetadataReference(), compilation0.EmitToImageReference() }) 3599foreach (var reference in new[] { compilation0.ToMetadataReference(), compilation0.EmitToImageReference() })
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\AddImportsTests.cs (1)
838return compilation.ToMetadataReference();
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
CSharpDeterministicKeyBuilderTests.cs (1)
436references: new[] { utilCompilation.ToMetadataReference() });
Microsoft.CodeAnalysis.UnitTests (4)
MetadataReferences\MetadataReferenceTests.cs (4)
341var r = c.ToMetadataReference(); 448r = CS.CSharpCompilation.Create("compilation name").ToMetadataReference(); 539var c1a = CS.CSharpCompilation.Create("goo").ToMetadataReference(); 541var c2 = CS.CSharpCompilation.Create("goo").ToMetadataReference();
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\CompilationAPITests.vb (2)
1054Dim csCompRef = csComp.ToMetadataReference(embedInteropTypes:=True) 1322Dim compRef = csComp.ToMetadataReference()