Table of Contents

Class ZeroesSegment

Namespace
AsmResolver
Assembly
AsmResolver.dll

Represents a segment containing zero bytes.

public class ZeroesSegment : SegmentBase, IReadableSegment, ISegment, IOffsetProvider, IWritable
Inheritance
ZeroesSegment
Implements
Inherited Members
Extension Methods

Constructors

ZeroesSegment(uint)

Creates a new zeroes-filled segment.

public ZeroesSegment(uint size)

Parameters

size uint

The number of zero bytes.

Properties

Size

Gets the number of zero bytes that are stored in this segment.

public uint Size { get; }

Property Value

uint

Methods

CreateReader(ulong, uint)

Creates a new binary reader that reads the raw contents of the segment.

public BinaryStreamReader CreateReader(ulong fileOffset, uint size)

Parameters

fileOffset ulong

The starting file offset of the reader.

size uint

The number of bytes to read.

Returns

BinaryStreamReader

The created binary reader.

Exceptions

ArgumentOutOfRangeException

Occurs when fileOffset is not within the range of the segment.

EndOfStreamException

Occurs when size indicates a too large length.

GetPhysicalSize()

Computes the number of bytes that the structure contains.

public override uint GetPhysicalSize()

Returns

uint

The number of bytes.

Write(BinaryStreamWriter)

Serializes the structure to an output stream.

public override void Write(BinaryStreamWriter writer)

Parameters

writer BinaryStreamWriter

The output stream to write the data to.