Redigera

Dela via


MetadataReaderProvider.GetMetadataReader Method

Definition

public System.Reflection.Metadata.MetadataReader GetMetadataReader (System.Reflection.Metadata.MetadataReaderOptions options = System.Reflection.Metadata.MetadataReaderOptions.Default, System.Reflection.Metadata.MetadataStringDecoder? utf8Decoder = default);
public System.Reflection.Metadata.MetadataReader GetMetadataReader (System.Reflection.Metadata.MetadataReaderOptions options = System.Reflection.Metadata.MetadataReaderOptions.ApplyWindowsRuntimeProjections, System.Reflection.Metadata.MetadataStringDecoder? utf8Decoder = default);
public System.Reflection.Metadata.MetadataReader GetMetadataReader (System.Reflection.Metadata.MetadataReaderOptions options = System.Reflection.Metadata.MetadataReaderOptions.ApplyWindowsRuntimeProjections, System.Reflection.Metadata.MetadataStringDecoder utf8Decoder = default);
public System.Reflection.Metadata.MetadataReader GetMetadataReader (System.Reflection.Metadata.MetadataReaderOptions options = System.Reflection.Metadata.MetadataReaderOptions.Default, System.Reflection.Metadata.MetadataStringDecoder utf8Decoder = default);
member this.GetMetadataReader : System.Reflection.Metadata.MetadataReaderOptions * System.Reflection.Metadata.MetadataStringDecoder -> System.Reflection.Metadata.MetadataReader
Public Function GetMetadataReader (Optional options As MetadataReaderOptions = System.Reflection.Metadata.MetadataReaderOptions.Default, Optional utf8Decoder As MetadataStringDecoder = Nothing) As MetadataReader
Public Function GetMetadataReader (Optional options As MetadataReaderOptions = System.Reflection.Metadata.MetadataReaderOptions.ApplyWindowsRuntimeProjections, Optional utf8Decoder As MetadataStringDecoder = Nothing) As MetadataReader

Parameters

options
MetadataReaderOptions

A bitwise combination of the enumeration values that represent the configuration when reading the metadata.

utf8Decoder
MetadataStringDecoder

The encoding to use.

Returns

A MetadataReader instance.

Exceptions

The encoding of utf8Decoder is not UTF8Encoding.

The current platform is big-endian.

IO error while reading from the underlying stream.

Provider has been disposed.

Remarks

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

If this method is called multiple times, each call with arguments equal to the arguments passed to the previous successful call returns the same instance of MetadataReader as the previous call.

Applies to