MetadataReader Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
MetadataReader(Byte*, Int32) |
Initializes a new instance of the MetadataReader class from the metadata stored at the given memory location. |
MetadataReader(Byte*, Int32, MetadataReaderOptions) |
Initializes a new instance of the MetadataReader class from the metadata stored at the given memory location. |
MetadataReader(Byte*, Int32, MetadataReaderOptions, MetadataStringDecoder) |
Initializes a new instance of the MetadataReader class from the metadata stored at the given memory location. |
MetadataReader(Byte*, Int32)
- Source:
- MetadataReader.cs
- Source:
- MetadataReader.cs
- Source:
- MetadataReader.cs
Initializes a new instance of the MetadataReader class from the metadata stored at the given memory location.
public:
MetadataReader(System::Byte* metadata, int length);
public MetadataReader (byte* metadata, int length);
new System.Reflection.Metadata.MetadataReader : nativeptr<byte> * int -> System.Reflection.Metadata.MetadataReader
Parameters
- metadata
- Byte*
A pointer to the first byte in a block of metadata.
- length
- Int32
The number of bytes in the block.
Remarks
The memory is owned by the caller. It must be kept alive and unmodified throughout the lifetime of the MetadataReader.
Applies to
MetadataReader(Byte*, Int32, MetadataReaderOptions)
- Source:
- MetadataReader.cs
- Source:
- MetadataReader.cs
- Source:
- MetadataReader.cs
Initializes a new instance of the MetadataReader class from the metadata stored at the given memory location.
public:
MetadataReader(System::Byte* metadata, int length, System::Reflection::Metadata::MetadataReaderOptions options);
public MetadataReader (byte* metadata, int length, System.Reflection.Metadata.MetadataReaderOptions options);
new System.Reflection.Metadata.MetadataReader : nativeptr<byte> * int * System.Reflection.Metadata.MetadataReaderOptions -> System.Reflection.Metadata.MetadataReader
Parameters
- metadata
- Byte*
- length
- Int32
- options
- MetadataReaderOptions
Remarks
The memory is owned by the caller. It must be kept memory alive and unmodified throughout the lifetime of the MetadataReader.
Use PEReaderExtensions.GetMetadataReader(PEReader, MetadataReaderOptions) to obtain metadata from a PE image.
Applies to
MetadataReader(Byte*, Int32, MetadataReaderOptions, MetadataStringDecoder)
- Source:
- MetadataReader.cs
- Source:
- MetadataReader.cs
- Source:
- MetadataReader.cs
Initializes a new instance of the MetadataReader class from the metadata stored at the given memory location.
public:
MetadataReader(System::Byte* metadata, int length, System::Reflection::Metadata::MetadataReaderOptions options, System::Reflection::Metadata::MetadataStringDecoder ^ utf8Decoder);
public MetadataReader (byte* metadata, int length, System.Reflection.Metadata.MetadataReaderOptions options, System.Reflection.Metadata.MetadataStringDecoder utf8Decoder);
public MetadataReader (byte* metadata, int length, System.Reflection.Metadata.MetadataReaderOptions options, System.Reflection.Metadata.MetadataStringDecoder? utf8Decoder);
new System.Reflection.Metadata.MetadataReader : nativeptr<byte> * int * System.Reflection.Metadata.MetadataReaderOptions * System.Reflection.Metadata.MetadataStringDecoder -> System.Reflection.Metadata.MetadataReader
Parameters
- metadata
- Byte*
- length
- Int32
- options
- MetadataReaderOptions
- utf8Decoder
- MetadataStringDecoder
Exceptions
length
is not positive.
metadata
is null
.
The encoding of utf8Decoder
is not UTF8Encoding.
The current platform is big-endian.
Bad metadata header.
Remarks
The memory is owned by the caller. It must be kept memory alive and unmodified throughout the lifetime of the MetadataReader.
Use PEReaderExtensions.GetMetadataReader(PEReader, MetadataReaderOptions, MetadataStringDecoder) to obtain metadata from a PE image.