PEReaderExtensions.GetMetadataReader Method
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
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
- 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
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
- 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
- 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
- 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
- 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.