<PackageReference Include="System.Reflection.Metadata" Version="11.0.0" />

System.Reflection.Metadata.MetadataReader

public sealed class MetadataReader
Reads metadata as defined by the ECMA 335 CLI specification.

Gets the information decoded from #Pdb stream, or null if the stream is not present.

public bool IsAssembly { get; }

Gets a value that indicates whether the metadata represents an assembly.

public MetadataKind MetadataKind { get; }

Gets the metadata kind.

public int MetadataLength { get; }

Gets the length of the underlying data.

public Byte* MetadataPointer { get; }

Gets the pointer to the underlying data.

public string MetadataVersion { get; }

Gets the version string read from metadata header.

Gets the MetadataReaderOptions passed to the constructor.

Gets the comparer used to compare strings stored in metadata.

Gets the decoder used by the reader to produce string instances from UTF8-encoded byte sequences.

public MetadataReader(Byte* metadata, int length)

Initializes a new instance of the MetadataReader class from the metadata stored at the given memory location.

public MetadataReader(Byte* metadata, int length, MetadataReaderOptions options)

Initializes a new instance of the MetadataReader class from the metadata stored at the given memory location.

public MetadataReader(Byte* metadata, int length, MetadataReaderOptions options, MetadataStringDecoder utf8Decoder)

Initializes a new instance of the MetadataReader class from the metadata stored at the given memory location.

public static AssemblyName GetAssemblyName(string assemblyFile)

Gets the AssemblyName for a given file.

public byte[] GetBlobBytes(BlobHandle handle)

public Guid GetGuid(GuidHandle handle)

public string GetString(StringHandle handle)

public string GetString(NamespaceDefinitionHandle handle)

public string GetString(DocumentNameBlobHandle handle)

public string GetUserString(UserStringHandle handle)