แก้ไข

แชร์ผ่าน


MetadataReader Constructors

Definition

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
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
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

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
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
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.

Applies to