Table of Contents

PstTableRow Class

Definition

Namespace
Bodu.IO.Pst
Assembly
Bodu.IO.Pst.dll
Package
Bodu.IO.Pst 1.3.0
Source
PstTableRow.cs

Represents one row of a table context: the row identifier and cell access by column property identifier.

public sealed class PstTableRow
Inheritance
PstTableRow
Inherited Members
Extension Methods

Remarks

A row copies its bytes when it is produced, so it remains valid independent of the matrix block it came from. Variable-size cells hold value references that resolve on access, exactly like property-context values.

When the session omits unresolvable values (OmitUnresolvableValues), each present cell's value reference is checked as the row is produced, and a cell whose reference does not resolve is treated as absent by every member of the row and listed in OmittedPropertyIds.

Properties

OmittedPropertyIds

Gets the property identifiers of the cells treated as absent because their value references do not resolve.

public IReadOnlyList<ushort> OmittedPropertyIds { get; }

Property Value

IReadOnlyList<ushort>

The omitted cells' column property identifiers, in column order; empty when every present cell's reference resolves or when the session does not omit unresolvable values.

Remarks

Cells are omitted only when the session was opened with OmitUnresolvableValues; otherwise an unresolvable reference raises PstFileFormatException when the cell is read. A non-empty list marks the row as salvaged from a damaged file.

RowId

Gets the row identifier the row's leading dword records.

public uint RowId { get; }

Property Value

uint

The row identifier.

Methods

EnumerateCells()

Enumerates the row's present cells in column order, resolving each payload as it is yielded.

public IEnumerable<PstPropertyValue> EnumerateCells()

Returns

IEnumerable<PstPropertyValue>

The present cell values.

Exceptions

PstFileFormatException

A cell's value reference does not resolve.

TryGetCell(ushort, out PstPropertyValue)

Attempts to retrieve a cell's value by its column's property identifier.

public bool TryGetCell(ushort propertyId, out PstPropertyValue value)

Parameters

propertyId ushort

The 16-bit property identifier.

value PstPropertyValue

When this method returns true, the cell value.

Returns

bool

true when the table declares the column and the row's existence bitmap marks the cell present.

Exceptions

PstFileFormatException

The cell's value reference does not resolve.

TryGetCellLength(ushort, out long)

Attempts to determine the length of a cell's payload without reading it.

public bool TryGetCellLength(ushort propertyId, out long length)

Parameters

propertyId ushort

The column's property identifier.

length long

When this method returns true, the payload length in bytes.

Returns

bool

true when the column exists and the cell is present.

Exceptions

PstFileFormatException

The cell's storage is malformed.

TryOpenCellStream(ushort, out Stream)

Attempts to open a cell's payload as a read-only, seekable stream.

public bool TryOpenCellStream(ushort propertyId, out Stream stream)

Parameters

propertyId ushort

The column's property identifier.

stream Stream

When this method returns true, the payload stream.

Returns

bool

true when the column exists and the cell is present.

Remarks

The streaming counterpart of TryGetCell(ushort, out PstPropertyValue): a subnode-resident cell value is read block by block on demand rather than materialized, so MaxNodeDataLength does not apply. The stream is bound to the owning session and must be disposed before it.

Exceptions

PstFileFormatException

The cell's storage is malformed.

Applies to

ProductVersions
.NET8, 10