EmailStorePstMutationTransaction
OfficeIMO.Email.Store
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
- document OfficeIMO.Email.EmailDocument
- isAssociated bool = false
- cancellationToken System.Threading.CancellationToken = default
Returns
stringpublic 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
Returns
EmailStorePstMutationReportpublic 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
Returns
Task<EmailStorePstMutationReport>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
- destinationParentFolderId string
- includeDescendants bool = true
- conflictPolicy OfficeIMO.Email.Store.EmailStorePstCopyConflictPolicy = Fail
- cancellationToken System.Threading.CancellationToken = default
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
- destinationFolderId string
- isAssociated bool? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
stringpublic string CreateFolder(string name, string? parentFolderId = null, string? containerClass = null) #Creates a folder and returns its transaction-local identifier.
Parameters
- name string
- parentFolderId string? = null
- containerClass string? = null
Returns
stringpublic 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
- recursive bool = false
- cancellationToken System.Threading.CancellationToken = default
public void DeleteItem(string itemId, CancellationToken cancellationToken = default) #Deletes an existing or newly staged item.
Parameters
- itemId string
- cancellationToken System.Threading.CancellationToken = default
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
Returns
EmailStorePstMutationPlanpublic 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
- newParentFolderId string
public void MoveItem(string itemId, string destinationFolderId, CancellationToken cancellationToken = default) #Moves an existing or newly staged item to another active folder.
Parameters
- itemId string
- destinationFolderId string
- cancellationToken System.Threading.CancellationToken = default
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
- options OfficeIMO.Email.Store.EmailStorePstMutationOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public void PatchItem(string itemId, EmailStoreItemPatch patch, CancellationToken cancellationToken = default) #Applies one reusable typed patch to an item.
Parameters
- itemId string
- patch OfficeIMO.Email.Store.EmailStoreItemPatch
- cancellationToken System.Threading.CancellationToken = default
public void PatchItemAttachments(string itemId, EmailAttachmentPatch patch, CancellationToken cancellationToken = default) #Applies ordered, bounds-checked attachment changes to an item.
Parameters
- itemId string
- patch OfficeIMO.Email.EmailAttachmentPatch
- cancellationToken System.Threading.CancellationToken = default
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
- patch OfficeIMO.Email.MapiPropertyPatch
- cancellationToken System.Threading.CancellationToken = default
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
- patch OfficeIMO.Email.Store.EmailStoreItemPatch
- cancellationToken System.Threading.CancellationToken = default
public EmailStoreItem ReadItem(string itemId, CancellationToken cancellationToken = default) #Reads one source item by its stable source identifier.
Parameters
- itemId string
- cancellationToken System.Threading.CancellationToken = default
Returns
EmailStoreItempublic void RenameFolder(string folderId, string name) #Changes a non-mandatory folder's display name.
Parameters
- folderId string
- name string
public void ReplaceItem(string itemId, EmailDocument document, CancellationToken cancellationToken = default) #Replaces the semantic document for an existing or newly staged item.
Parameters
- itemId string
- document OfficeIMO.Email.EmailDocument
- cancellationToken System.Threading.CancellationToken = default
public void SetItemAssociated(string itemId, bool isAssociated, CancellationToken cancellationToken = default) #Moves an item between normal contents and folder-associated contents.
Parameters
- itemId string
- isAssociated bool
- cancellationToken System.Threading.CancellationToken = default
Inherited Methods
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.