/// <summary> /// Populate data from <see cref="MetadataLocator.MetadataStreamInfo"/> /// </summary> /// <param name="stream"></param> /// <exception cref="ArgumentNullException"></exception> protected MetadataStreamInfo(MetadataLocator.MetadataStreamInfo stream) { if (stream is null) { throw new ArgumentNullException(nameof(stream)); } Address = stream.Address; Length = stream.Length; }
internal unsafe MetadataStreamInfo(InternalMetadataStreamInfo streamInfo, IntPtr moduleHandle) { Rva = (uint)((byte *)streamInfo.Address - (byte *)moduleHandle); Length = streamInfo.Length; }