156 references to GetReference
Microsoft.CodeAnalysis (1)
MetadataReference\MetadataReference.cs (1)
115
/// <see cref="ModuleMetadata.CreateFromImage(ImmutableArray{byte})"/> and <see cref="ModuleMetadata.
GetReference
(DocumentationProvider, string, string)"/>.
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (6)
Emit\CompilationEmitTests.cs (2)
1312
var reference = ModuleMetadata.CreateFromImage(moduleComp.EmitToArray()).
GetReference
();
4621
var metadataRef = ModuleMetadata.CreateFromStream(comp.EmitToStream()).
GetReference
();
Emit\EmitErrorTests.cs (2)
270
var compilationOK = CreateCompilation(source, new MetadataReference[] { moduleMetadata.
GetReference
(filePath: @"R:\A\B\ModuleNameMismatch.netmodule") });
274
var compilationError = CreateCompilation(source, new MetadataReference[] { moduleMetadata.
GetReference
(filePath: @"R:\A\B\ModuleNameMismatch.mod") });
Emit\EmitMetadataTests.cs (2)
236
var netModule1 = ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.netModule.netModule1).
GetReference
(filePath: Path.GetFullPath("netModule1.netmodule"));
237
var netModule2 = ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.netModule.netModule2).
GetReference
(filePath: Path.GetFullPath("netModule2.netmodule"));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (11)
Attributes\AttributeTests_Assembly.cs (5)
1007
return GetNetModuleWithAssemblyAttributes(source, references, assemblyName).
GetReference
(display: assemblyName + ".netmodule");
1075
references: new[] { netModuleWithAssemblyAttributes.
GetReference
() },
1122
references: new[] { netModuleWithAssemblyAttributes.
GetReference
() },
1196
references: new[] { MinCorlibRef, netModuleWithAssemblyAttributes.
GetReference
() },
1237
references: new[] { MinCorlibRef, netModuleWithAssemblyAttributes.
GetReference
() },
Attributes\AttributeTests_Embedded.cs (2)
107
var reference = ModuleMetadata.CreateFromImage(module.EmitToArray()).
GetReference
();
227
var moduleRef = ModuleMetadata.CreateFromImage(module.EmitToArray()).
GetReference
();
Attributes\AttributeTests_Synthesized.cs (3)
1521
var reference = ModuleMetadata.CreateFromImage(referenceComp.EmitToArray()).
GetReference
();
1562
var reference = ModuleMetadata.CreateFromImage(referenceComp.EmitToArray()).
GetReference
();
1623
var moduleReference = ModuleMetadata.CreateFromImage(compilation.EmitToArray()).
GetReference
();
Attributes\InternalsVisibleToAndStrongNameTests.cs (1)
1553
new[] { metadata.
GetReference
() },
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (76)
Compilation\CompilationAPITests.cs (1)
2237
var c = CSharpCompilation.Create("Goo", references: new[] { MscorlibRef, mdModule.
GetReference
(display: "ModuleCS00") }, options: TestOptions.ReleaseDll);
Symbols\Metadata\PE\TypeForwarders.cs (2)
1545
var ref0 = ModuleMetadata.CreateFromImage(bits0).
GetReference
();
1729
var ref0 = asm0.
GetReference
();
Symbols\SymbolErrorTests.cs (72)
104
references: new[] { ModuleMetadata.CreateFromImage(module1.EmitToArray(options: new EmitOptions(metadataOnly: true))).
GetReference
() });
109
references: new[] { ModuleMetadata.CreateFromImage(module2.EmitToArray(options: new EmitOptions(metadataOnly: true))).
GetReference
() });
5590
s_mod1.
GetReference
(),
5591
s_mod2.
GetReference
(),
5629
s_mod2.
GetReference
(),
5674
s_mod1.
GetReference
(),
5675
s_mod2.
GetReference
(),
5688
s_mod1.
GetReference
(),
5689
s_mod2.
GetReference
(),
5736
s_mod2.
GetReference
(),
5749
s_mod2.
GetReference
(),
5795
s_mod1.
GetReference
(),
5796
s_mod2.
GetReference
(),
5809
s_mod1.
GetReference
(),
5810
s_mod2.
GetReference
(),
5857
s_mod2.
GetReference
(),
5870
s_mod2.
GetReference
(),
5916
s_mod1.
GetReference
(),
5928
s_mod1.
GetReference
(),
5973
s_mod2.
GetReference
(),
5986
s_mod2.
GetReference
(),
6032
s_mod2.
GetReference
(),
6045
s_mod2.
GetReference
(),
6091
s_mod1.
GetReference
(),
6104
s_mod1.
GetReference
(),
6138
s_mod1.
GetReference
(),
6174
s_mod1.
GetReference
(),
6210
s_mod2.
GetReference
(),
6246
s_mod2.
GetReference
(),
6289
s_mod1.
GetReference
(),
6302
s_mod1.
GetReference
(),
6349
s_mod1.
GetReference
(),
6350
s_mod2.
GetReference
(),
6363
s_mod1.
GetReference
(),
6364
s_mod2.
GetReference
(),
6411
s_mod1.
GetReference
(),
6424
s_mod1.
GetReference
(),
6471
s_mod1.
GetReference
(),
6472
s_mod2.
GetReference
(),
6485
s_mod1.
GetReference
(),
6486
s_mod2.
GetReference
(),
6536
s_mod1.
GetReference
(),
6549
s_mod1.
GetReference
(),
6599
s_mod2.
GetReference
(),
6612
s_mod2.
GetReference
(),
6662
s_mod1.
GetReference
(),
6663
s_mod2.
GetReference
(),
6679
s_mod1.
GetReference
(),
6680
s_mod2.
GetReference
(),
6733
s_mod1.
GetReference
(),
6746
s_mod1.
GetReference
(),
6796
s_mod2.
GetReference
(),
6812
s_mod2.
GetReference
(),
6865
s_mod1.
GetReference
(),
6866
s_mod2.
GetReference
(),
6882
s_mod1.
GetReference
(),
6883
s_mod2.
GetReference
(),
6930
s_mod1.
GetReference
(),
6931
s_mod2.
GetReference
(),
6947
s_mod2.
GetReference
(),
6948
s_mod1.
GetReference
(),
6966
s_mod2.
GetReference
(),
6968
s_mod1.
GetReference
()
7015
s_mod1.
GetReference
(),
7016
s_mod2.
GetReference
(),
7029
s_mod2.
GetReference
(),
7030
s_mod1.
GetReference
(),
7045
s_mod1.
GetReference
(),
7047
s_mod2.
GetReference
()
7134
var moduleRef = ModuleMetadata.CreateFromImage(ilBytes).
GetReference
();
7203
var moduleRef1 = ModuleMetadata.CreateFromImage(ilBytes).
GetReference
();
15174
var ref1 = ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.CorLibrary.NoMsCorLibRef).
GetReference
(display: "NoMsCorLibRef.mod");
Symbols\TypeTests.cs (1)
894
var module1Ref = ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.netModule.netModule1).
GetReference
(display: "netModule1.netmodule");
Microsoft.CodeAnalysis.Scripting.UnitTests (3)
ScriptOptionsTests.cs (3)
38
var moduleRef = ModuleMetadata.CreateFromImage(TestResources.MetadataTests.NetModule01.ModuleCS00).
GetReference
();
71
var assemblyRef = ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.Methods.CSMethods).
GetReference
();
80
var moduleRef = ModuleMetadata.CreateFromImage(TestResources.MetadataTests.NetModule01.ModuleCS00).
GetReference
();
Microsoft.CodeAnalysis.Test.Utilities (26)
CommonTestBase.cs (2)
168
: ((ModuleMetadata)emittedMetadata).
GetReference
();
253
return ModuleMetadata.CreateFromImage(assemblyBytes).
GetReference
();
Compilation\CompilationExtensions.cs (1)
132
return ModuleMetadata.CreateFromImage(image).
GetReference
(display: comp.MakeSourceModuleName());
CompilationVerifier.cs (1)
718
return moduleMetadata.
GetReference
(display: display);
Mocks\TestReferences.cs (22)
27
() => ModuleMetadata.CreateFromImage(TestResources.MetadataTests.NetModule01.ModuleCS00).
GetReference
(display: "ModuleCS00.mod"),
32
() => ModuleMetadata.CreateFromImage(TestResources.MetadataTests.NetModule01.ModuleCS01).
GetReference
(display: "ModuleCS01.mod"),
37
() => ModuleMetadata.CreateFromImage(TestResources.MetadataTests.NetModule01.ModuleVB01).
GetReference
(display: "ModuleVB01.mod"),
182
() => ModuleMetadata.CreateFromImage(TestResources.General.With_SpacesModule).
GetReference
(display: "With Spaces.netmodule"),
219
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.netModule.netModule1).
GetReference
(display: "netModule1.netmodule"),
224
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.netModule.netModule2).
GetReference
(display: "netModule2.netmodule"),
229
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.netModule.CrossRefModule1).
GetReference
(display: "CrossRefModule1.netmodule"),
234
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.netModule.CrossRefModule2).
GetReference
(display: "CrossRefModule2.netmodule"),
247
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.netModule.hash_module).
GetReference
(display: "hash_module.netmodule"),
252
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.netModule.x64COFF).
GetReference
(display: "x64COFF.obj"),
270
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.V1.MTTestModule1).
GetReference
(display: "MTTestModule1.netmodule"),
286
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.V1.MTTestModule2).
GetReference
(display: "MTTestModule2.netmodule"),
321
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.V2.MTTestModule3).
GetReference
(display: "MTTestModule3.netmodule"),
356
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.V3.MTTestModule4).
GetReference
(display: "MTTestModule4.netmodule"),
445
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.CustomModifiers.ModifiersModule).
GetReference
(display: "Modifiers.netmodule"),
529
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.RetargetingCycle.RetV1.ClassB).
GetReference
(display: "ClassB.netmodule"),
665
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.MultiTargeting.Source1Module).
GetReference
(display: "Source1Module.netmodule"),
670
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.MultiTargeting.Source3Module).
GetReference
(display: "Source3Module.netmodule"),
675
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.MultiTargeting.Source4Module).
GetReference
(display: "Source4Module.netmodule"),
680
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.MultiTargeting.Source5Module).
GetReference
(display: "Source5Module.netmodule"),
685
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.MultiTargeting.Source7Module).
GetReference
(display: "Source7Module.netmodule"),
828
() => ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.netModule.netModule1).
GetReference
(display: "netModule1.netmodule"),
Microsoft.CodeAnalysis.UnitTests (4)
MetadataReferences\MetadataReferenceTests.cs (4)
257
var r = module.
GetReference
(filePath: @"c:\temp", display: "hello", documentation: doc);
404
var mmr1 = module.
GetReference
();
409
var r = module.
GetReference
(filePath: path);
436
r = ModuleMetadata.CreateFromImage(TestResources.General.C1).
GetReference
();
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (12)
Attributes\AssemblyAttributes.vb (5)
1219
Return GetNetModuleWithAssemblyAttributes(netModuleSourceHeader, netModuleSourceBody, references, nameSuffix).
GetReference
()
1305
Dim consoleappCompilation = CreateCompilationWithMscorlib40AndReferences(consoleappSource, {netModuleWithAssemblyAttributes.
GetReference
()})
1343
consoleappCompilation = CreateCompilationWithMscorlib40AndReferences(consoleappSource, {netModuleWithAssemblyAttributes.
GetReference
()}, TestOptions.ReleaseModule)
1422
Dim consoleappCompilation = CreateEmptyCompilationWithReferences(consoleappSource, {MinCorlibRef, netModuleWithAssemblyAttributes.
GetReference
()})
1454
consoleappCompilation = CreateEmptyCompilationWithReferences(consoleappSource, {MinCorlibRef, netModuleWithAssemblyAttributes.
GetReference
()}, TestOptions.ReleaseModule)
Attributes\AttributeTests.vb (1)
4969
Dim reference = ModuleMetadata.CreateFromImage(moduleCode.EmitToArray()).
GetReference
()
Attributes\InternalsVisibleToAndStrongNameTests.vb (1)
1438
{metadata.
GetReference
()},
Emit\CompilationEmitTests.vb (1)
1160
Dim reference = ModuleMetadata.CreateFromImage(moduleComp.EmitToArray()).
GetReference
()
Emit\EmitErrorTests.vb (2)
539
Dim compilation1 = CreateCompilationWithMscorlib40AndVBRuntimeAndReferences(source, {netModuleMetadata.
GetReference
(filePath:="R:\A\B\ModuleNameMismatch.netmodule")})
542
Dim compilation2 = CreateCompilationWithMscorlib40AndVBRuntimeAndReferences(source, {netModuleMetadata.
GetReference
(filePath:="R:\A\B\ModuleNameMismatch.mod")})
Emit\EmitMetadata.vb (2)
304
{mscorlibRef, netModule1.
GetReference
(), netModule2.
GetReference
()},
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (4)
Compilation\CompilationAPITests.vb (4)
1086
Dim modRef1 = ModuleMetadata.CreateFromImage(TestResources.MetadataTests.NetModule01.ModuleCS00).
GetReference
()
1172
Dim comp = VisualBasicCompilation.Create("Compilation", references:={ModuleMetadata.CreateFromImage(Net461.Resources.System).
GetReference
()})
1184
Dim modRef1 = ModuleMetadata.CreateFromImage(TestResources.MetadataTests.NetModule01.ModuleVB01).
GetReference
()
2476
Dim c = VisualBasicCompilation.Create("Goo", references:={MscorlibRef, mdModule.
GetReference
(display:="ModuleCS00")}, options:=TestOptions.ReleaseDll)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (13)
SymbolsTests\ExtensionMethods\ExtensionMethodTests.vb (2)
1006
Dim ILRef = ModuleMetadata.CreateFromImage(File.ReadAllBytes(reference.Path)).
GetReference
()
2234
Dim ILRef = ModuleMetadata.CreateFromImage(File.ReadAllBytes(reference.Path)).
GetReference
()
SymbolsTests\Metadata\PE\TypeForwarders.vb (4)
1108
Dim modRef1 = ModuleMetadata.CreateFromImage(ilBytes).
GetReference
()
1170
Dim modRef2 = ModuleMetadata.CreateFromImage(ilBytes).
GetReference
()
1289
Dim modRef = ModuleMetadata.CreateFromImage(ilBytes).
GetReference
()
1350
</compilation>, {ModuleMetadata.CreateFromImage(TestResources.SymbolsTests.TypeForwarders.Forwarded).
GetReference
(),
SymbolsTests\MetadataFileReferenceCompilationTests.vb (1)
38
Dim ref = ModuleMetadata.CreateFromImage({}).
GetReference
(filePath:="Goo.dll")
SymbolsTests\Source\TypeTests.vb (6)
3159
Dim moduleRef = ModuleMetadata.CreateFromImage(ilBytes).
GetReference
()
3225
Dim moduleRef1 = ModuleMetadata.CreateFromImage(ilBytes).
GetReference
()
3332
Dim module1_FT1_Ref = ModuleMetadata.CreateFromImage(ilBytes).
GetReference
()
3339
Dim module2_FT1_Ref = ModuleMetadata.CreateFromImage(ilBytes).
GetReference
()
3346
Dim module3_FT2_Ref = ModuleMetadata.CreateFromImage(ilBytes).
GetReference
()
3377
Dim module4_Ref = ModuleMetadata.CreateFromImage(ilBytes).
GetReference
()