API Reference

Class

EmailStorePstMutationTransaction

Namespace OfficeIMO.Email.Store
Assembly OfficeIMO.Email
Implements
IDisposable
Modifiers sealed

Stages folder and item changes against an existing Unicode PST and commits them as a verified atomic rewrite. Disposing an uncommitted transaction leaves the source byte-for-byte unchanged.

Inheritance

  • Object
  • EmailStorePstMutationTransaction

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by

Methods

public String AddItem(String folderId, EmailDocument document, Boolean isAssociated = false, CancellationToken cancellationToken = null) #
Returns: String

Adds an item and returns its transaction-local identifier.

Parameters

folderId System.String requiredposition: 0
document OfficeIMO.Email.EmailDocument requiredposition: 1
isAssociated System.Boolean = false optionalposition: 2
cancellationToken System.Threading.CancellationToken = null optionalposition: 3
public EmailStorePstMutationReport Commit(CancellationToken cancellationToken = null) #
Returns: EmailStorePstMutationReport

Writes and verifies a staged Unicode PST, optionally commits a byte-for-byte backup, and atomically replaces the original. Any failure before the final commit leaves the original unchanged.

Parameters

cancellationToken System.Threading.CancellationToken = null optionalposition: 0
public async Task<EmailStorePstMutationReport> CommitAsync(CancellationToken cancellationToken = null) #
Returns: Task<EmailStorePstMutationReport>

Writes and verifies a staged Unicode PST, asynchronously flushes the staged artifact and optional byte-for-byte backup, then atomically replaces the original. Ordered PST serialization and semantic comparison remain synchronous stateful phases and are not hidden in a worker-thread wrapper.

Parameters

cancellationToken System.Threading.CancellationToken = null optionalposition: 0
public EmailStorePstFolderCopyResult CopyFolder(String folderId, String destinationParentFolderId, Boolean includeDescendants = true, EmailStorePstCopyConflictPolicy conflictPolicy = Fail, CancellationToken cancellationToken = null) #
Returns: EmailStorePstFolderCopyResult

Copies a source folder, optionally including its complete subtree and items.

Parameters

folderId System.String requiredposition: 0
destinationParentFolderId System.String requiredposition: 1
includeDescendants System.Boolean = true optionalposition: 2
conflictPolicy OfficeIMO.Email.Store.EmailStorePstCopyConflictPolicy = Fail optionalposition: 3
cancellationToken System.Threading.CancellationToken = null optionalposition: 4
public String CopyItem(String itemId, String destinationFolderId, Nullable<Boolean> isAssociated = null, CancellationToken cancellationToken = null) #
Returns: String

Copies an existing source item into another folder and returns a transaction-local identifier.

Parameters

itemId System.String requiredposition: 0
destinationFolderId System.String requiredposition: 1
isAssociated System.Nullable{System.Boolean} = null optionalposition: 2
cancellationToken System.Threading.CancellationToken = null optionalposition: 3
public String CreateFolder(String name, String parentFolderId = null, String containerClass = null) #
Returns: String

Creates a folder and returns its transaction-local identifier.

Parameters

name System.String requiredposition: 0
parentFolderId System.String = null optionalposition: 1
containerClass System.String = null optionalposition: 2
public Void DeleteFolder(String folderId, Boolean recursive = false, CancellationToken cancellationToken = null) #
Returns: Void

Deletes a non-mandatory folder. A non-empty folder requires recursive. Recursive deletion includes active descendants and their items.

Parameters

folderId System.String requiredposition: 0
recursive System.Boolean = false optionalposition: 1
cancellationToken System.Threading.CancellationToken = null optionalposition: 2
public Void DeleteItem(String itemId, CancellationToken cancellationToken = null) #
Returns: Void

Deletes an existing or newly staged item.

Parameters

itemId System.String requiredposition: 0
cancellationToken System.Threading.CancellationToken = null optionalposition: 1
public EmailStorePstMutationPlan DryRun(CancellationToken cancellationToken = null) #
Returns: EmailStorePstMutationPlan

Returns a value-free dry run of every effective staged operation without writing an artifact.

Parameters

cancellationToken System.Threading.CancellationToken = null optionalposition: 0
public IEnumerable<EmailStoreItemReference> EnumerateItems() #
Returns: IEnumerable<EmailStoreItemReference>

Enumerates active source item references after staged deletes.

public Void MoveFolder(String folderId, String newParentFolderId) #
Returns: Void

Moves a non-mandatory folder below another active folder.

Parameters

folderId System.String requiredposition: 0
newParentFolderId System.String requiredposition: 1
public Void MoveItem(String itemId, String destinationFolderId, CancellationToken cancellationToken = null) #
Returns: Void

Moves an existing or newly staged item to another active folder.

Parameters

itemId System.String requiredposition: 0
destinationFolderId System.String requiredposition: 1
cancellationToken System.Threading.CancellationToken = null optionalposition: 2
public static EmailStorePstMutationTransaction Open(String path, EmailStorePstMutationOptions options = null, CancellationToken cancellationToken = null) #
Returns: EmailStorePstMutationTransaction

Opens and locks an existing Unicode PST for one mutation transaction.

Parameters

path System.String requiredposition: 0
options OfficeIMO.Email.Store.EmailStorePstMutationOptions = null optionalposition: 1
cancellationToken System.Threading.CancellationToken = null optionalposition: 2
public Void PatchItem(String itemId, EmailStoreItemPatch patch, CancellationToken cancellationToken = null) #
Returns: Void

Applies one reusable typed patch to an item.

Parameters

itemId System.String requiredposition: 0
patch OfficeIMO.Email.Store.EmailStoreItemPatch requiredposition: 1
cancellationToken System.Threading.CancellationToken = null optionalposition: 2
public Void PatchItemAttachments(String itemId, EmailAttachmentPatch patch, CancellationToken cancellationToken = null) #
Returns: Void

Applies ordered, bounds-checked attachment changes to an item.

Parameters

itemId System.String requiredposition: 0
patch OfficeIMO.Email.EmailAttachmentPatch requiredposition: 1
cancellationToken System.Threading.CancellationToken = null optionalposition: 2
public Void PatchItemProperties(String itemId, MapiPropertyPatch patch, CancellationToken cancellationToken = null) #
Returns: Void

Applies exact typed MAPI property changes after normal semantic projection when the item is rewritten.

Parameters

itemId System.String requiredposition: 0
patch OfficeIMO.Email.MapiPropertyPatch requiredposition: 1
cancellationToken System.Threading.CancellationToken = null optionalposition: 2
public EmailStorePstMutationSelectionReport PatchItems(EmailStoreTableQuery query, EmailStoreItemPatch patch, CancellationToken cancellationToken = null) #
Returns: EmailStorePstMutationSelectionReport

Applies one reusable typed patch to every row selected by a bounded table query. Selection completes before any item is changed, and a scan-limit result is rejected rather than partially mutating the transaction.

Parameters

query OfficeIMO.Email.Store.EmailStoreTableQuery requiredposition: 0
patch OfficeIMO.Email.Store.EmailStoreItemPatch requiredposition: 1
cancellationToken System.Threading.CancellationToken = null optionalposition: 2
public EmailStoreItem ReadItem(String itemId, CancellationToken cancellationToken = null) #
Returns: EmailStoreItem

Reads one source item by its stable source identifier.

Parameters

itemId System.String requiredposition: 0
cancellationToken System.Threading.CancellationToken = null optionalposition: 1
public Void RenameFolder(String folderId, String name) #
Returns: Void

Changes a non-mandatory folder's display name.

Parameters

folderId System.String requiredposition: 0
name System.String requiredposition: 1
public Void ReplaceItem(String itemId, EmailDocument document, CancellationToken cancellationToken = null) #
Returns: Void

Replaces the semantic document for an existing or newly staged item.

Parameters

itemId System.String requiredposition: 0
document OfficeIMO.Email.EmailDocument requiredposition: 1
cancellationToken System.Threading.CancellationToken = null optionalposition: 2
public Void SetItemAssociated(String itemId, Boolean isAssociated, CancellationToken cancellationToken = null) #
Returns: Void

Moves an item between normal contents and folder-associated contents.

Parameters

itemId System.String requiredposition: 0
isAssociated System.Boolean requiredposition: 1
cancellationToken System.Threading.CancellationToken = null optionalposition: 2

Properties

public String SourcePath { get; } #

Full path of the PST that will be replaced only after a successful commit.

public String RootFolderId { get; } #

Source folder identifier used when a new folder omits its parent.

public IReadOnlyList<EmailStorePstMutationFolder> Folders { get; } #

Current staged folder view. Transaction-local identifiers remain stable until commit.