10 references to CreateFromMetadata
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\CompilationAPITests.cs (1)
2235using (var mdModule = ModuleMetadata.CreateFromMetadata((IntPtr)ptr, h.MetadataSize))
Microsoft.CodeAnalysis.Features (1)
EditAndContinue\DebuggingSession.cs (1)
365var moduleMetadata = ModuleMetadata.CreateFromMetadata((IntPtr)metadataReader.MetadataPointer, metadataReader.MetadataLength);
Microsoft.CodeAnalysis.UnitTests (7)
MetadataReferences\ModuleMetadataTests.cs (7)
23Assert.Throws<ArgumentNullException>(() => ModuleMetadata.CreateFromMetadata(IntPtr.Zero, 0)); 24Assert.Throws<ArgumentOutOfRangeException>(() => { fixed (byte* ptr = new byte[] { 1, 2, 3 }) ModuleMetadata.CreateFromMetadata((IntPtr)ptr, 0); }); 25Assert.Throws<ArgumentOutOfRangeException>(() => { fixed (byte* ptr = new byte[] { 1, 2, 3 }) ModuleMetadata.CreateFromMetadata((IntPtr)ptr, -1); }); 29var metadata = ModuleMetadata.CreateFromMetadata((IntPtr)ptr, 3); 42var metadata = ModuleMetadata.CreateFromMetadata((IntPtr)ptr, h.MetadataSize); 55ModuleMetadata.CreateFromMetadata((IntPtr)ptr, h.MetadataSize); 276var metadata = ModuleMetadata.CreateFromMetadata((IntPtr)stream.PositionPointer, (int)stream.Length);
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Compilation\CompilationAPITests.vb (1)
2475Using mdModule = ModuleMetadata.CreateFromMetadata(pinnedPEImage.AddrOfPinnedObject() + headers.MetadataStartOffset, headers.MetadataSize)