/// <summary> /// Adds a conflict to the list of in-memory /// </summary> /// <param name="conflict">Conflict to add</param> /// <param name="context">Context for which the conflict is being added</param> public void AddSyncConflict(SyncConflict conflict, WinEightContext context) { OfflineEntity entity = Collections[conflict.LiveEntity.GetType()].AddOrUpdateSyncEntity((OfflineEntity)conflict.LiveEntity); SyncConflict oldConflict = Collections[conflict.LiveEntity.GetType()].MapSyncConflict(entity, conflict, context); SyncConflicts.Add(conflict); if (oldConflict != null) { ClearSyncConflict(oldConflict, context); } }
public void AddSerializedConflict(SyncConflict conflict, IsolatedStorageOfflineContext context) { Type entityType = conflict.LiveEntity.GetType(); IsolatedStorageOfflineEntity entity = Collections[entityType].AddOrUpdateSyncEntity((IsolatedStorageOfflineEntity)conflict.LiveEntity); IsolatedStorageSyncConflict oldConflict = (IsolatedStorageSyncConflict)Collections[entityType].MapSyncConflict(entity, conflict, context); SyncConflicts.Add(conflict); if (oldConflict != null) { ClearSyncConflict(oldConflict, context); } }