2 overrides of ToMetadataReference
Microsoft.CodeAnalysis.CSharp (1)
Compilation\CSharpCompilation.cs (1)
1289public override CompilationReference ToMetadataReference(ImmutableArray<string> aliases = default, bool embedInteropTypes = false)
Microsoft.CodeAnalysis.VisualBasic (1)
Compilation\VisualBasicCompilation.vb (1)
1362Public Overrides Function ToMetadataReference(Optional aliases As ImmutableArray(Of String) = Nothing, Optional embedInteropTypes As Boolean = False) As CompilationReference
29 references to ToMetadataReference
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (5)
Attributes\AttributeTests_IsByRefLike.cs (1)
473CompileAndVerify(code2, options: options.WithModuleName("Assembly2"), references: new[] { comp1.Compilation.ToMetadataReference() }, symbolValidator: module =>
Attributes\AttributeTests_IsUnmanaged.cs (1)
744CompileAndVerify(code2, options: options.WithModuleName("Assembly2"), references: new[] { comp1.Compilation.ToMetadataReference() }, symbolValidator: module =>
Attributes\AttributeTests_ReadOnlyStruct.cs (1)
465CompileAndVerify(code2, options: options.WithModuleName("Assembly2"), references: new[] { comp1.Compilation.ToMetadataReference() }, symbolValidator: module =>
Attributes\AttributeTests_RefReadOnly.cs (1)
1190CompileAndVerify(code2, options: options.WithModuleName("Assembly2"), references: new[] { comp1.Compilation.ToMetadataReference() }, symbolValidator: module =>
Attributes\AttributeTests_WellKnownAttributes.cs (1)
11581var reference = comp1.Compilation.ToMetadataReference();
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (2)
CommandLineRunnerTests.cs (2)
812", new MetadataReference[] { NetFramework.mscorlib, libBase1.ToMetadataReference() }, lib1Name); 819", new MetadataReference[] { NetFramework.mscorlib, libBase1.ToMetadataReference() }, lib2Name);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\NullableReferenceTypesTests.cs (1)
138510var comp2 = CreateCompilation(source2, [verifier1.Compilation.ToMetadataReference()]);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (12)
Compilation\UsedAssembliesTests.cs (12)
604var comp2Ref = comp2.ToMetadataReference(); 626comp2Ref = comp2.ToMetadataReference(); 646comp2Ref = comp2.ToMetadataReference(); 2441var comp1Ref = comp1.ToMetadataReference(); 2508var comp1Ref = comp1.ToMetadataReference(); 2596var comp1Ref = comp1.ToMetadataReference(); 2684var comp1Ref = comp1.ToMetadataReference(); 2769var comp1Ref = comp1.ToMetadataReference(); 2857var comp1Ref = comp1.ToMetadataReference(); 2945var comp1Ref = comp1.ToMetadataReference(); 3036var comp1Ref = comp1.ToMetadataReference(); 3346var comp1Ref = comp1.ToMetadataReference();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
MetadataTestHelpers.cs (1)
39mrefs: mrefs.Concat(compilations.Select(c => c.ToMetadataReference())).ToArray());
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
CodeGen\WinRTCollectionTests.cs (1)
7370var compRef = verifier.Compilation.ToMetadataReference();
Microsoft.CodeAnalysis.Test.Utilities (1)
CommonTestBase.cs (1)
497return useCompilationReference ? comp.ToMetadataReference() : comp.EmitToImageReference();
Microsoft.CodeAnalysis.UnitTests (1)
MetadataReferences\MetadataReferenceTests.cs (1)
540var c1b = c1a.Compilation.ToMetadataReference();
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (3)
UsedAssembliesTests.vb (3)
426Dim comp2Ref = comp2.ToMetadataReference() 448comp2Ref = comp2.ToMetadataReference() 468comp2Ref = comp2.ToMetadataReference()
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SymbolKeyTests.cs (2)
1171new[] { compilation1.ToMetadataReference() }); 1218new[] { compilation1.ToMetadataReference() });