Class AbstractPstFile
Provides abstract pst file functionality.
Implements
Inherited Members
Namespace: DRIT.Mail.Pst.PhysicalLayout
Assembly: DRIT.Mail.dll
Syntax
public abstract class AbstractPstFile : IDisposable
Fields
View Source_defaultEncoding
Stores the default encoding value used by this type.
Declaration
protected Encoding _defaultEncoding
Field Value
| Type | Description |
|---|---|
| Encoding |
_disposeStream
Stores the dispose stream value used by this type.
Declaration
protected bool _disposeStream
Field Value
| Type | Description |
|---|---|
| bool |
_messageStore
Stores the message store value used by this type.
Declaration
protected MessageStore _messageStore
Field Value
| Type | Description |
|---|---|
| MessageStore |
_stream
Stores the stream value used by this type.
Declaration
protected Stream _stream
Field Value
| Type | Description |
|---|---|
| Stream |
Properties
View SourceDefaultEncoding
Gets the default encoding of the PST file.
Declaration
public Encoding DefaultEncoding { get; }
Property Value
| Type | Description |
|---|---|
| Encoding |
Folders
Gets the folder hierarchy of the PST file.
Declaration
public FolderHierarchy Folders { get; }
Property Value
| Type | Description |
|---|---|
| FolderHierarchy |
MessageStore
Gets or sets the message store value.
Declaration
public MessageStore MessageStore { get; }
Property Value
| Type | Description |
|---|---|
| MessageStore |
PstSettings
Gets or sets the pst settings value.
Declaration
public PstSettings PstSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| PstSettings |
Stream
Gets or sets the stream value.
Declaration
public Stream Stream { get; }
Property Value
| Type | Description |
|---|---|
| Stream |
ValidationResults
Gets or sets the validation results value.
Declaration
public ValidationResults ValidationResults { get; }
Property Value
| Type | Description |
|---|---|
| ValidationResults |
Methods
View SourceCreateNew(PstCreateArguments)
Creates the new.
Declaration
protected void CreateNew(PstCreateArguments createArguments)
Parameters
| Type | Name | Description |
|---|---|---|
| PstCreateArguments | createArguments | The create arguments used by the operation. |
Dispose()
Processes the dispose data.
Declaration
public void Dispose()
From(AbstractPstFile)
Copies property values from the specified source.
Declaration
public void From(AbstractPstFile file)
Parameters
| Type | Name | Description |
|---|---|---|
| AbstractPstFile | file | The file or path to process. |
From(AbstractPstFile, PstCloneOptions)
Copies property values from the specified source.
Declaration
public void From(AbstractPstFile file, PstCloneOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| AbstractPstFile | file | The file or path to process. |
| PstCloneOptions | options | The options controlling the operation. |
GetDataBlockStream()
Gets the stream used to read data block data.
Declaration
public Stream GetDataBlockStream()
Returns
| Type | Description |
|---|---|
| Stream |
Remarks
If CryptMethod is set in the header, create the appropriate stream upon the original PST stream.
ReadExisting()
Reads the contents of an existing PST file.
Declaration
protected void ReadExisting()
Remarks
Read the header. Read the first AMap and PMap and other relevant allocator pages. Read the node database.
Validate()
Runs structural validation (header CRC, allocation map, block/page CRCs, node database integrity, table templates) and returns the combined validation results, including any issues collected lazily during read operations.
Declaration
public ValidationResults Validate()
Returns
| Type | Description |
|---|---|
| ValidationResults | The ValidationResults containing all issues found during both structural validation and read operations. Inspect Issues for structured diagnostics, or HasErrors to check if any errors were found. |
Remarks
Read operations (opening folders, reading messages, etc.) collect issues lazily into ValidationResults as they encounter corruption. This method runs the structural validators on top of those lazily-collected issues, providing a complete corruption report in a single call.
Thrown exceptions indicate unrecoverable corruption where reading could not continue. Collected issues indicate recoverable corruption where the read continued with partial or default data.
Write()
Writes values to the underlying storage.
Declaration
public void Write()