70 references to CreateFromImage
Microsoft.CodeAnalysis (5)
MetadataReference\AssemblyMetadata.cs (1)
116return Create(ModuleMetadata.CreateFromImage(peImage));
MetadataReference\MetadataReference.cs (3)
102/// It is recommended to use <see cref="AssemblyMetadata.CreateFromImage(ImmutableArray{byte})"/> or <see cref="ModuleMetadata.CreateFromImage(ImmutableArray{byte})"/> 115/// <see cref="ModuleMetadata.CreateFromImage(ImmutableArray{byte})"/> and <see cref="ModuleMetadata.GetReference(DocumentationProvider, string, string)"/>. 127MetadataImageKind.Module => ModuleMetadata.CreateFromImage(peImage),
MetadataReference\ModuleMetadata.cs (1)
157return CreateFromImage(ImmutableArray.CreateRange(peImage));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Emit\CompilationEmitTests.cs (2)
1958var id1 = ModuleMetadata.CreateFromImage(firstImage).GetMetadataReader().ReadAssemblyIdentityOrThrow(); 1959var id2 = ModuleMetadata.CreateFromImage(secondImage).GetMetadataReader().ReadAssemblyIdentityOrThrow();
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (31)
Emit\EditAndContinue\AssemblyReferencesTests.cs (5)
223var md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData); 328var md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData); 411var md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData); 491var md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData); 591var md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData);
Emit\EditAndContinue\EditAndContinueDelegateCacheTests.cs (5)
54using var moduleData0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData); 118using var moduleData0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData); 182using var moduleData0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData); 246using var moduleData0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData); 310using var moduleData0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData);
Emit\EditAndContinue\EditAndContinuePdbTests.cs (1)
130var md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData);
Emit\EditAndContinue\EditAndContinueTests.cs (3)
348var md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData); 401var md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData); 469var md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData);
Emit\EditAndContinue\LocalSlotMappingTests.cs (17)
55var generation0 = CreateInitialBaseline(compilation0, ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData), methodData0.EncDebugInfoProvider()); 536using var md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData); 648using var md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData); 758using var md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData); 849using var md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData); 1745var generation0 = CreateInitialBaseline(compilation0, ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData), methodData0.EncDebugInfoProvider()); 2199var generation0 = CreateInitialBaseline(compilation0, ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData), methodData0.EncDebugInfoProvider()); 2423var generation0 = CreateInitialBaseline(compilation0, ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData), methodData0.EncDebugInfoProvider()); 2921var generation0 = CreateInitialBaseline(compilation0, ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData), methodData0.EncDebugInfoProvider()); 3057var generation0 = CreateInitialBaseline(compilation0, ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData), methodData0.EncDebugInfoProvider()); 3220var generation0 = CreateInitialBaseline(compilation0, ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData), methodData0.EncDebugInfoProvider()); 3384var generation0 = CreateInitialBaseline(compilation0, ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData), methodData0.EncDebugInfoProvider()); 3493var generation0 = CreateInitialBaseline(compilation0, ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData), methodData0.EncDebugInfoProvider()); 3603var generation0 = CreateInitialBaseline(compilation0, ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData), methodData0.EncDebugInfoProvider()); 3694var generation0 = CreateInitialBaseline(compilation0, ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData), methodData0.EncDebugInfoProvider()); 3897var md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData); 5112var md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (6)
Symbols\Metadata\PE\TypeForwarders.cs (4)
1507using (ModuleMetadata metadata = ModuleMetadata.CreateFromImage(verifier2.EmittedAssemblyData)) 1728var asm0 = ModuleMetadata.CreateFromImage(CompileAndVerify(comp0, verify: Verification.Skipped).EmittedAssemblyData); 1732var asm1 = ModuleMetadata.CreateFromImage(CompileAndVerify(comp1).EmittedAssemblyData); 1776using (ModuleMetadata metadata = ModuleMetadata.CreateFromImage(verifier2.EmittedAssemblyData))
Symbols\SymbolErrorTests.cs (2)
7134var moduleRef = ModuleMetadata.CreateFromImage(ilBytes).GetReference(); 7203var moduleRef1 = ModuleMetadata.CreateFromImage(ilBytes).GetReference();
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
307var moduleMetadata = ModuleMetadata.CreateFromImage(peImage);
Microsoft.CodeAnalysis.Test.Utilities (8)
CommonTestBase.cs (1)
253return ModuleMetadata.CreateFromImage(assemblyBytes).GetReference();
Compilation\CompilationExtensions.cs (1)
132return ModuleMetadata.CreateFromImage(image).GetReference(display: comp.MakeSourceModuleName());
CompilationVerifier.cs (5)
68var metadata = ModuleMetadata.CreateFromImage(EmittedAssemblyData); 86var metadata = ModuleMetadata.CreateFromImage(image); 170using var moduleMetadata = ModuleMetadata.CreateFromImage(testEnvironment.GetMainImage()); 233using (var moduleMetadata = ModuleMetadata.CreateFromImage(testEnvironment.GetMainImage())) 713var moduleMetadata = ModuleMetadata.CreateFromImage(image);
Metadata\ModuleData.cs (1)
97using (var metadata = ModuleMetadata.CreateFromImage(image))
Microsoft.CodeAnalysis.UnitTests (1)
MetadataReferences\ModuleMetadataTests.cs (1)
93Assert.Throws<ArgumentNullException>(() => ModuleMetadata.CreateFromImage(default(ImmutableArray<byte>)));
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (6)
Attributes\AssemblyAttributes.vb (4)
1230Return ModuleMetadata.CreateFromImage(bytes) 1348metadata = ModuleMetadata.CreateFromImage(consoleappCompilation.EmitToArray()).Module 1410Dim netModuleWithAssemblyAttributes = ModuleMetadata.CreateFromImage(bytes) 1459metadata = ModuleMetadata.CreateFromImage(consoleappCompilation.EmitToArray()).Module
Attributes\InternalsVisibleToAndStrongNameTests.vb (2)
389Dim Metadata = ModuleMetadata.CreateFromImage(c.EmitToArray()) 422Dim Metadata = ModuleMetadata.CreateFromImage(c.EmitToArray())
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (9)
SymbolsTests\Metadata\PE\TypeForwarders.vb (3)
1108Dim modRef1 = ModuleMetadata.CreateFromImage(ilBytes).GetReference() 1170Dim modRef2 = ModuleMetadata.CreateFromImage(ilBytes).GetReference() 1289Dim modRef = ModuleMetadata.CreateFromImage(ilBytes).GetReference()
SymbolsTests\Source\TypeTests.vb (6)
3159Dim moduleRef = ModuleMetadata.CreateFromImage(ilBytes).GetReference() 3225Dim moduleRef1 = ModuleMetadata.CreateFromImage(ilBytes).GetReference() 3332Dim module1_FT1_Ref = ModuleMetadata.CreateFromImage(ilBytes).GetReference() 3339Dim module2_FT1_Ref = ModuleMetadata.CreateFromImage(ilBytes).GetReference() 3346Dim module3_FT2_Ref = ModuleMetadata.CreateFromImage(ilBytes).GetReference() 3377Dim module4_Ref = ModuleMetadata.CreateFromImage(ilBytes).GetReference()
Roslyn.Test.PdbUtilities (1)
EditAndContinue\EditAndContinueTest.cs (1)
62var md = ModuleMetadata.CreateFromImage(verifier.EmittedAssemblyData);