Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

EmailStorePstMutationTransaction

OfficeIMO.Email.Store

Namespace
OfficeIMO.Email.Store
Assembly
OfficeIMO.Email
Source revision
be6c300e4ab1 with working tree changes
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

Explore 1 API references to this type

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

Returned or exposed by 1

Methods

public string AddItem(string folderId, EmailDocument document, bool isAssociated = false, CancellationToken cancellationToken = default) #

Adds an item and returns its transaction-local identifier.

Parameters

folderId string required
document OfficeIMO.Email.EmailDocument required
isAssociated bool = false optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

string
public EmailStorePstMutationReport Commit(CancellationToken cancellationToken = default) #

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 = default optional
public async Task<EmailStorePstMutationReport> CommitAsync(CancellationToken cancellationToken = default) #

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 = default optional
public EmailStorePstFolderCopyResult CopyFolder(string folderId, string destinationParentFolderId, bool includeDescendants = true, EmailStorePstCopyConflictPolicy conflictPolicy = Fail, CancellationToken cancellationToken = default) #

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

Parameters

folderId string required
destinationParentFolderId string required
includeDescendants bool = true optional
conflictPolicy OfficeIMO.Email.Store.EmailStorePstCopyConflictPolicy = Fail optional
cancellationToken System.Threading.CancellationToken = default optional
public string CopyItem(string itemId, string destinationFolderId, bool? isAssociated = null, CancellationToken cancellationToken = default) #

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

Parameters

itemId string required
destinationFolderId string required
isAssociated bool? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

string
public string CreateFolder(string name, string? parentFolderId = null, string? containerClass = null) #

Creates a folder and returns its transaction-local identifier.

Parameters

name string required
parentFolderId string? = null optional
containerClass string? = null optional

Returns

string
public void DeleteFolder(string folderId, bool recursive = false, CancellationToken cancellationToken = default) #

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

Parameters

folderId string required
recursive bool = false optional
cancellationToken System.Threading.CancellationToken = default optional
public void DeleteItem(string itemId, CancellationToken cancellationToken = default) #

Deletes an existing or newly staged item.

Parameters

itemId string required
cancellationToken System.Threading.CancellationToken = default optional
public void Dispose() #

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public EmailStorePstMutationPlan DryRun(CancellationToken cancellationToken = default) #

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

Parameters

cancellationToken System.Threading.CancellationToken = default optional
public IEnumerable<EmailStoreItemReference> EnumerateItems() #

Enumerates active source item references after staged deletes.

Returns

IEnumerable<EmailStoreItemReference>
public void MoveFolder(string folderId, string newParentFolderId) #

Moves a non-mandatory folder below another active folder.

Parameters

folderId string required
newParentFolderId string required
public void MoveItem(string itemId, string destinationFolderId, CancellationToken cancellationToken = default) #

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

Parameters

itemId string required
destinationFolderId string required
cancellationToken System.Threading.CancellationToken = default optional
public static EmailStorePstMutationTransaction Open(string path, EmailStorePstMutationOptions? options = null, CancellationToken cancellationToken = default) #

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

Parameters

path string required
options OfficeIMO.Email.Store.EmailStorePstMutationOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public void PatchItem(string itemId, EmailStoreItemPatch patch, CancellationToken cancellationToken = default) #

Applies one reusable typed patch to an item.

Parameters

itemId string required
patch OfficeIMO.Email.Store.EmailStoreItemPatch required
cancellationToken System.Threading.CancellationToken = default optional
public void PatchItemAttachments(string itemId, EmailAttachmentPatch patch, CancellationToken cancellationToken = default) #

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

Parameters

itemId string required
patch OfficeIMO.Email.EmailAttachmentPatch required
cancellationToken System.Threading.CancellationToken = default optional
public void PatchItemProperties(string itemId, MapiPropertyPatch patch, CancellationToken cancellationToken = default) #

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

Parameters

itemId string required
patch OfficeIMO.Email.MapiPropertyPatch required
cancellationToken System.Threading.CancellationToken = default optional
public EmailStorePstMutationSelectionReport PatchItems(EmailStoreTableQuery query, EmailStoreItemPatch patch, CancellationToken cancellationToken = default) #

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 required
patch OfficeIMO.Email.Store.EmailStoreItemPatch required
cancellationToken System.Threading.CancellationToken = default optional
public EmailStoreItem ReadItem(string itemId, CancellationToken cancellationToken = default) #

Reads one source item by its stable source identifier.

Parameters

itemId string required
cancellationToken System.Threading.CancellationToken = default optional
public void RenameFolder(string folderId, string name) #

Changes a non-mandatory folder's display name.

Parameters

folderId string required
name string required
public void ReplaceItem(string itemId, EmailDocument document, CancellationToken cancellationToken = default) #

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

Parameters

itemId string required
document OfficeIMO.Email.EmailDocument required
cancellationToken System.Threading.CancellationToken = default optional
public void SetItemAssociated(string itemId, bool isAssociated, CancellationToken cancellationToken = default) #

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

Parameters

itemId string required
isAssociated bool required
cancellationToken System.Threading.CancellationToken = default optional

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.