Class MetadataBuffer
- Namespace
- AsmResolver.DotNet.Builder.Metadata
- Assembly
- AsmResolver.DotNet.dll
Provides a default implementation for IMetadataBuffer that produces compressed metadata (#~).
public class MetadataBuffer : IMetadataBuffer
- Inheritance
-
MetadataBuffer
- Implements
- Inherited Members
Constructors
MetadataBuffer()
Creates a new metadata directory buffer that targets runtime version v4.0.30319.
public MetadataBuffer()
MetadataBuffer(string)
Creates a new metadata directory buffer.
public MetadataBuffer(string versionString)
Parameters
versionString
stringThe runtime version string to use.
Properties
BlobStream
Gets the mutable blob stream (#Blob) buffer of this metadata directory.
public BlobStreamBuffer BlobStream { get; }
Property Value
GuidStream
Gets the mutable GUID stream (#GUID) buffer of this metadata directory.
public GuidStreamBuffer GuidStream { get; }
Property Value
OptimizeStringIndices
Gets or sets a value indicating whether the strings stream should be optimized for size upon constructing the metadata directory. This means that strings that are a suffix of another will not be added twice to the buffer, but rather will be referenced using an offset within the longer string. This avoids lots of duplication in the final stream.
public bool OptimizeStringIndices { get; set; }
Property Value
StringsStream
Gets the mutable strings stream (#Strings) buffer of this metadata directory.
public StringsStreamBuffer StringsStream { get; }
Property Value
TablesStream
Gets the mutable tables stream (#~ or #-) buffer of this metadata directory.
public TablesStreamBuffer TablesStream { get; }
Property Value
UserStringsStream
Gets the mutable user-strings stream (#US) buffer of this metadata directory.
public UserStringsStreamBuffer UserStringsStream { get; }
Property Value
Methods
CreateMetadata()
Flushes all metadata stream buffers and builds up a new metadata directory.
public MetadataDirectory CreateMetadata()
Returns
- MetadataDirectory
The constructed metadata directory.