Class SerializedTableStream
- Namespace
- AsmResolver.PE.DotNet.Metadata
- Assembly
- AsmResolver.PE.dll
Provides an implementation of a tables stream that obtains tables from a readable segment in a file.
public class SerializedTableStream : TablesStream, ILazyMetadataStream, IMetadataStream, ISegment, IOffsetProvider, IWritable
- Inheritance
-
SerializedTableStream
- Implements
- Inherited Members
Constructors
SerializedTableStream(MetadataReaderContext, string, in BinaryStreamReader)
Creates a new tables stream with the provided file segment reader as the raw contents of the stream.
public SerializedTableStream(MetadataReaderContext context, string name, in BinaryStreamReader reader)
Parameters
context
MetadataReaderContextThe reader context.
name
stringThe name of the stream.
reader
BinaryStreamReaderThe raw contents of the stream.
SerializedTableStream(MetadataReaderContext, string, byte[])
Creates a new tables stream with the provided byte array as the raw contents of the stream.
public SerializedTableStream(MetadataReaderContext context, string name, byte[] rawData)
Parameters
context
MetadataReaderContextThe reader context.
name
stringThe name of the stream.
rawData
byte[]The raw contents of the stream.
Properties
CanRead
Gets a value indicating whether the raw contents of the stream can be read using a binary stream reader.
public override bool CanRead { get; }
Property Value
Methods
CreateReader()
Creates a binary reader that reads the raw contents of the metadata stream.
public override BinaryStreamReader CreateReader()
Returns
- BinaryStreamReader
The reader.
Exceptions
- InvalidOperationException
Occurs when CanRead is
false
.
GetColumnSize(ColumnType)
Gets a value indicating the size of a column in a table.
protected override uint GetColumnSize(ColumnType columnType)
Parameters
columnType
ColumnTypeThe column type to verify.
Returns
- uint
The column size.
GetTables()
Obtains the collection of tables in the tables stream.
protected override IList<IMetadataTable?> GetTables()
Returns
- IList<IMetadataTable>
The tables, including empty tables if there are any.
Remarks
This method is called upon initialization of the Tables property.
Initialize(MetadataDirectory)
Finalizes the initialization process of the metadata stream.
public void Initialize(MetadataDirectory parentMetadata)
Parameters
parentMetadata
MetadataDirectoryThe metadata directory that defines the stream.