You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 5.1 version.
How to subscribe to synchronization conflicts?
Synchronization conflicts can be tracked by using ForConflicts
method. You will receive notifications when a new conflicts is created or an existing one is resolved.
Syntax
IObservableWithTask<ConflictNotification> ForConflicts();
Return Value | |
---|---|
IObservableWithTask<ConflictNotification> | The observable that allows to add subscriptions to received notifications |
Example
IDisposable subscription = store
.Changes()
.ForConflicts()
.Subscribe(conflict =>
{
switch (conflict.Status)
{
case ConflictStatus.Detected:
Console.WriteLine("New conflict! File name: {0}", conflict.FileName);
break;
case ConflictStatus.Resolved:
Console.WriteLine("Conflict resolved! File name: {0}", conflict.FileName);
break;
}
});
Remarks
Information
To get more method overloads, especially the ones supporting delegates, please add Reactive Extensions package to your project.