ReplicaMetadata::RemoveItemMetadata Method
When overridden in a derived class, removes item metadata from the metadata store.
Assembly: Microsoft.Synchronization.MetadataStorage (in Microsoft.Synchronization.MetadataStorage.dll)
| Exception | Condition |
|---|---|
| ObjectDisposedException | The object has been disposed or was not initialized correctly. |
| ArgumentNullException | globalIds is a nullptr. |
| SyncIdFormatMismatchException | The format of an ID in globalIds does not match the format schema that was specified when this replica metadata was initialized. |
| ItemMetadataNotFoundException | An item that is listed in globalIds was not found in the metadata. For the implementation of this class that is available through SqlMetadataStore, all items that were enumerated before the item that caused the exception are removed from the metadata. |
The implementation of this class that is available through SqlMetadataStore immediately performs this operation on the store. If there is an outstanding explicit transaction, the operation will occur within that transaction and will be rolled back if the transaction is not committed or is rolled back.
Note |
|---|
This is not the correct way to mark an item as a tombstone. To mark an item as a tombstone, set ItemMetadata::IsDeleted to true. A provider uses this method when it wants to stop tracking metadata for an item and wants to remove the item completely from the store, such as during tombstone cleanup. |
Note