SimpleSyncServices::RemoveItemFromReplica Method

Removes metadata for an item from a replica, but not the item itself.

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

public:
bool RemoveItemFromReplica(
	ItemFieldDictionary^ key
)

Parameters

key
Type: Microsoft.Synchronization.SimpleProviders::ItemFieldDictionary
An ItemFieldDictionary object that represents the item to remove.

Return Value

Type: System::Boolean
true if the item is found and metadata is removed. Otherwise false.

ExceptionCondition
SimpleProviderInvalidOperationException

BeginRemoveItemsFromReplica was not called before this method was called.

ArgumentNullException

key is a nullptr.

ArgumentOutOfRangeException

key is empty.

The item will be re-enumerated as a newly created item during a subsequent synchronization session.

BeginRemoveItemsFromReplica must be called to start a transaction before RemoveItemFromReplica is called. Items that are removed by calling RemoveItemFromReplica are not committed until EndRemoveItemsFromReplica is called after all calls to RemoveItemFromReplica are finished.

Show: