Class MessageStore
Provides a high-level view of the PST message store node, exposing display name, record key, password hash, and folder entry-ID properties.
Inherited Members
Namespace: DRIT.Mail.Pst.API
Assembly: DRIT.Mail.dll
Syntax
public class MessageStore
Constructors
View SourceMessageStore(AbstractPstMessageStore)
Initialises a new instance of MessageStore wrapping the given low-level message store node.
Declaration
public MessageStore(AbstractPstMessageStore pstMessageStore)
Parameters
| Type | Name | Description |
|---|---|---|
| AbstractPstMessageStore | pstMessageStore | The underlying PST message store node. |
Fields
View SourceDefaultDisplayName
The default display name used for a new PST message store.
Declaration
public const string DefaultDisplayName = "Outlook Data File"
Field Value
| Type | Description |
|---|---|
| string |
Properties
View SourceDisplayName
Display name of PST
Declaration
public string DisplayName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
PasswordHash
Gets or sets the CRC-32 password hash stored in the message store.
Set to 0 for no password.
Declaration
public int? PasswordHash { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
Remarks
Reference: MS-PST 2.4.3 Message Store — PidTagPstPassword (PR_PST_PASSWORD)
RecordKey
Gets or sets the GUID that uniquely identifies this message store.
Declaration
public Guid? RecordKey { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid? |
Remarks
Reference: MS-OXCPRPT 2.2.1.8 PidTagRecordKey Property
Methods
View SourceCreate(AbstractPstMessageStore)
Creates a new Message Store on the specified PST Message Store.
Declaration
public static MessageStore Create(AbstractPstMessageStore pstMessageStore)
Parameters
| Type | Name | Description |
|---|---|---|
| AbstractPstMessageStore | pstMessageStore | The underlying PST message store node to initialise. |
Returns
| Type | Description |
|---|---|
| MessageStore | A new MessageStore wrapping the initialised store. |
EnsureRecordKey()
Returns the existing RecordKey, or generates and persists a new one if it is not yet set.
Declaration
public Guid EnsureRecordKey()
Returns
| Type | Description |
|---|---|
| Guid | The current or newly generated record key Guid. |
From(AbstractPstMessageStore, AbstractPstMessageStore)
Copies all message store properties from otherPstMessageStore into
thisPstMessageStore and returns a MessageStore over the result.
Declaration
public static MessageStore From(AbstractPstMessageStore thisPstMessageStore, AbstractPstMessageStore otherPstMessageStore)
Parameters
| Type | Name | Description |
|---|---|---|
| AbstractPstMessageStore | thisPstMessageStore | The destination message store node to write into. |
| AbstractPstMessageStore | otherPstMessageStore | The source message store node to copy from. |
Returns
| Type | Description |
|---|---|
| MessageStore | A new MessageStore wrapping the updated destination node. |
Write()
Persists the message store properties to the underlying PST.
Declaration
public void Write()