PstNodeId Struct
Definition
Represents a 32-bit node identifier: five type bits in the low positions and a 27-bit index above them (MS-PST §2.2.2.1).
public readonly struct PstNodeId : IEquatable<PstNodeId>
- Implements
- Inherited Members
- Extension Methods
Remarks
A handful of fixed identifiers anchor every file - MessageStore (0x21),
NameToIdMap (0x61), and RootFolder (0x122) - and are exposed here as
well-known values.
Constructors
PstNodeId(PstNodeType, uint)
Initializes a new instance of the PstNodeId struct from a type and index.
public PstNodeId(PstNodeType type, uint index)
Parameters
typePstNodeTypeThe node type (the five low bits).
indexuintThe 27-bit index.
PstNodeId(uint)
Initializes a new instance of the PstNodeId struct from a raw 32-bit identifier.
public PstNodeId(uint value)
Parameters
valueuintThe raw identifier.
Properties
Index
Gets the 27-bit index.
public uint Index { get; }
Property Value
- uint
The index above the type bits.
MessageStore
Gets the message-store node identifier (NID_MESSAGE_STORE, 0x21).
public static PstNodeId MessageStore { get; }
Property Value
- PstNodeId
The well-known identifier.
NameToIdMap
Gets the named-property mapping node identifier (NID_NAME_TO_ID_MAP, 0x61).
public static PstNodeId NameToIdMap { get; }
Property Value
- PstNodeId
The well-known identifier.
RootFolder
Gets the root folder node identifier (NID_ROOT_FOLDER, 0x122).
public static PstNodeId RootFolder { get; }
Property Value
- PstNodeId
The well-known identifier.
Type
Gets the node type carried in the five low bits.
public PstNodeType Type { get; }
Property Value
- PstNodeType
The PstNodeType of the node.
Value
Gets the raw 32-bit identifier.
public uint Value { get; }
Property Value
- uint
The raw value: type in the five low bits, index above.
Methods
Equals(PstNodeId)
Determines whether this identifier carries the same raw value as another.
public bool Equals(PstNodeId other)
Parameters
otherPstNodeIdThe identifier to compare with.
Returns
Equals(object?)
Determines whether this identifier equals another object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with.
Returns
GetHashCode()
Returns a hash code consistent with Equals(PstNodeId).
public override int GetHashCode()
Returns
- int
A hash code computed over the raw value.
ToString()
Returns the canonical hexadecimal form of the identifier.
public override string ToString()
Returns
- string
The raw value as
0xfollowed by eight upper-case hexadecimal digits.
Operators
operator ==(PstNodeId, PstNodeId)
Determines whether two identifiers carry the same raw value.
public static bool operator ==(PstNodeId left, PstNodeId right)
Parameters
Returns
operator !=(PstNodeId, PstNodeId)
Determines whether two identifiers carry different raw values.
public static bool operator !=(PstNodeId left, PstNodeId right)
Parameters
Returns
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |