Пример #1
0
    /// <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;
    }
Пример #2
0
 internal unsafe MetadataStreamInfo(InternalMetadataStreamInfo streamInfo, IntPtr moduleHandle)
 {
     Rva    = (uint)((byte *)streamInfo.Address - (byte *)moduleHandle);
     Length = streamInfo.Length;
 }