10 references to CreateFromMetadata
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.Features (1)
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)