Share via


ReplicaMetadata.RemoveItemMetadata Method

When overridden in a derived class, removes item metadata from the metadata store.

Namespace:  Microsoft.Synchronization.MetadataStorage
Assembly:  Microsoft.Synchronization.MetadataStorage (in Microsoft.Synchronization.MetadataStorage.dll)

Syntax

'Declaration
Public MustOverride Sub RemoveItemMetadata ( _
    globalIds As IEnumerable(Of SyncId) _
)
'Usage
Dim instance As ReplicaMetadata
Dim globalIds As IEnumerable(Of SyncId)

instance.RemoveItemMetadata(globalIds)
public abstract void RemoveItemMetadata(
    IEnumerable<SyncId> globalIds
)
public:
virtual void RemoveItemMetadata(
    IEnumerable<SyncId^>^ globalIds
) abstract
abstract RemoveItemMetadata : 
        globalIds:IEnumerable<SyncId> -> unit 
public abstract function RemoveItemMetadata(
    globalIds : IEnumerable<SyncId>
)

Parameters

Exceptions

Exception Condition
ObjectDisposedException

The object has been disposed or was not initialized correctly.

ArgumentNullException

globalIds is a null reference (Nothing in Visual Basic).

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.

Remarks

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.

See Also

Reference

ReplicaMetadata Class

Microsoft.Synchronization.MetadataStorage Namespace