ערוך

שתף באמצעות


PEReaderExtensions.GetMetadataReader Method

Definition

Overloads

GetMetadataReader(PEReader)

Gets a MetadataReader from a PEReader.

GetMetadataReader(PEReader, MetadataReaderOptions)

Gets a metadata reader with the specified metadata reading configuration from a PEReader.

GetMetadataReader(PEReader, MetadataReaderOptions, MetadataStringDecoder)

Gets a metadata reader with the specified metadata reading configuration and encoding configuration from a PEReader.

GetMetadataReader(PEReader)

Source:
PEReaderExtensions.cs
Source:
PEReaderExtensions.cs
Source:
PEReaderExtensions.cs

Gets a MetadataReader from a PEReader.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Reflection::Metadata::MetadataReader ^ GetMetadataReader(System::Reflection::PortableExecutable::PEReader ^ peReader);
public static System.Reflection.Metadata.MetadataReader GetMetadataReader (this System.Reflection.PortableExecutable.PEReader peReader);
static member GetMetadataReader : System.Reflection.PortableExecutable.PEReader -> System.Reflection.Metadata.MetadataReader
<Extension()>
Public Function GetMetadataReader (peReader As PEReader) As MetadataReader

Parameters

peReader
PEReader

The current PEReader instance.

Returns

A metadata reader.

Exceptions

peReader is null.

The current platform is big-endian.

IO error while reading from the underlying stream.

Remarks

The caller must keep the PEReader alive and undisposed throughout the lifetime of the metadata reader.

Applies to

GetMetadataReader(PEReader, MetadataReaderOptions)

Source:
PEReaderExtensions.cs
Source:
PEReaderExtensions.cs
Source:
PEReaderExtensions.cs

Gets a metadata reader with the specified metadata reading configuration from a PEReader.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Reflection::Metadata::MetadataReader ^ GetMetadataReader(System::Reflection::PortableExecutable::PEReader ^ peReader, System::Reflection::Metadata::MetadataReaderOptions options);
public static System.Reflection.Metadata.MetadataReader GetMetadataReader (this System.Reflection.PortableExecutable.PEReader peReader, System.Reflection.Metadata.MetadataReaderOptions options);
static member GetMetadataReader : System.Reflection.PortableExecutable.PEReader * System.Reflection.Metadata.MetadataReaderOptions -> System.Reflection.Metadata.MetadataReader
<Extension()>
Public Function GetMetadataReader (peReader As PEReader, options As MetadataReaderOptions) As MetadataReader

Parameters

peReader
PEReader

The current PEReader instance.

options
MetadataReaderOptions

An enumeration value indicating the metadata reading configuration.

Returns

A metadata reader with the specified metadata reading configuration.

Exceptions

peReader is null.

The current platform is big-endian.

IO error while reading from the underlying stream.

Remarks

The caller must keep the PEReader alive and undisposed throughout the lifetime of the metadata reader.

Applies to

GetMetadataReader(PEReader, MetadataReaderOptions, MetadataStringDecoder)

Source:
PEReaderExtensions.cs
Source:
PEReaderExtensions.cs
Source:
PEReaderExtensions.cs

Gets a metadata reader with the specified metadata reading configuration and encoding configuration from a PEReader.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Reflection::Metadata::MetadataReader ^ GetMetadataReader(System::Reflection::PortableExecutable::PEReader ^ peReader, System::Reflection::Metadata::MetadataReaderOptions options, System::Reflection::Metadata::MetadataStringDecoder ^ utf8Decoder);
public static System.Reflection.Metadata.MetadataReader GetMetadataReader (this System.Reflection.PortableExecutable.PEReader peReader, System.Reflection.Metadata.MetadataReaderOptions options, System.Reflection.Metadata.MetadataStringDecoder utf8Decoder);
public static System.Reflection.Metadata.MetadataReader GetMetadataReader (this System.Reflection.PortableExecutable.PEReader peReader, System.Reflection.Metadata.MetadataReaderOptions options, System.Reflection.Metadata.MetadataStringDecoder? utf8Decoder);
static member GetMetadataReader : System.Reflection.PortableExecutable.PEReader * System.Reflection.Metadata.MetadataReaderOptions * System.Reflection.Metadata.MetadataStringDecoder -> System.Reflection.Metadata.MetadataReader
<Extension()>
Public Function GetMetadataReader (peReader As PEReader, options As MetadataReaderOptions, utf8Decoder As MetadataStringDecoder) As MetadataReader

Parameters

peReader
PEReader

The current PEReader instance.

options
MetadataReaderOptions

An enumeration value indicating the metadata reading configuration.

utf8Decoder
MetadataStringDecoder

A metadata string decoder with the encoding configuration.

Returns

>A metadata reader with the specified metadata reading configuration and encoding configuration.

Exceptions

peReader is null.

The encoding of utf8Decoder is not UTF8Encoding.

The current platform is big-endian.

IO error while reading from the underlying stream.

Remarks

The caller must keep the PEReader undisposed throughout the lifetime of the metadata reader.

Applies to