PstTableContext Class
Definition
Represents a node's table context (TC): the LTP table of typed columns over identifier-keyed rows, with
forward-only row enumeration and keyed row lookup - format-agnostic, with no MAPI semantics.
public sealed class PstTableContext
- Inheritance
-
PstTableContext
- Inherited Members
- Extension Methods
Remarks
Row enumeration streams the row matrix one block at a time and never materializes the whole table; each yielded row copies its own bytes, so rows remain valid after enumeration advances. The row count comes from the table's row index.
Properties
Columns
Gets the table's columns in stored order.
public IReadOnlyList<PstTableColumn> Columns { get; }
Property Value
- IReadOnlyList<PstTableColumn>
The column views.
RowCount
Gets the number of rows the table's row index records.
public int RowCount { get; }
Property Value
- int
The row count.
Methods
EnumerateRowIds()
Enumerates the identifiers of the table's rows in matrix order, without materializing the rows.
public IEnumerable<uint> EnumerateRowIds()
Returns
- IEnumerable<uint>
The row identifiers.
Remarks
Hierarchy, contents, and attachment tables are usually consumed for their row identifiers alone - each names the object node the row stands for - so this path reads the leading dword of each row in place and allocates nothing per row.
Exceptions
- PstFileFormatException
The row matrix does not resolve or holds fewer rows than the row index records.
EnumerateRows()
Enumerates the table's rows in matrix order, one matrix block resident at a time.
public IEnumerable<PstTableRow> EnumerateRows()
Returns
- IEnumerable<PstTableRow>
The rows.
Exceptions
- PstFileFormatException
The row matrix does not resolve or holds fewer rows than the row index records.
TryGetRow(uint, out PstTableRow)
Attempts to retrieve a row by its identifier through the table's row index.
public bool TryGetRow(uint rowId, out PstTableRow row)
Parameters
rowIduintThe row identifier.
rowPstTableRowWhen this method returns true, the row.
Returns
Exceptions
- PstFileFormatException
The row index names a row the matrix does not hold, or the matrix does not resolve.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |