示例#1
0
 public void Clear()
 {
     ClearCollections();
     SyncConflicts.Clear();
     SyncErrors.Clear();
     AnchorBlob = null;
 }
示例#2
0
        /// <summary>
        /// Clears All SyncErrors
        /// </summary>
        public void ClearSyncErrors()
        {
            foreach (SyncError syncError in SyncErrors)
            {
                Collections[syncError.LiveEntity.GetType()].ClearSyncError((OfflineEntity)syncError.LiveEntity);
            }

            SyncErrors.Clear();
        }
示例#3
0
        public void AddSerializedError(SyncError error, WinEightContext context)
        {
            SyncError oldError = (SyncError)Collections[error.ErrorEntity.GetType()].MapSyncError((OfflineEntity)error.LiveEntity, error, context);

            SyncErrors.Add(error);

            if (oldError != null)
            {
                ClearSyncError(oldError, context);
            }
        }
示例#4
0
        public void AddSerializedError(SyncError error, IsolatedStorageOfflineContext context)
        {
            IsolatedStorageSyncError oldError = (IsolatedStorageSyncError)Collections[error.ErrorEntity.GetType()].MapSyncError((IsolatedStorageOfflineEntity)error.LiveEntity, error, context);

            SyncErrors.Add(error);

            if (oldError != null)
            {
                ClearSyncError(oldError, context);
            }
        }
示例#5
0
        /// <summary>
        /// Adds a error to the list of in-memory
        /// </summary>
        /// <param name="error"></param>
        /// <param name="context">Context for the conflict is being added</param>
        public void AddSyncError(SyncError error, WinEightContext context)
        {
            OfflineEntity entity   = Collections[error.LiveEntity.GetType()].AddOrUpdateSyncEntity((OfflineEntity)error.LiveEntity);
            SyncError     oldError = Collections[error.LiveEntity.GetType()].MapSyncError(entity, error, context);

            SyncErrors.Add(error);

            if (oldError != null)
            {
                ClearSyncError(oldError, context);
            }
        }
示例#6
0
 /// <summary>
 /// Removes the specified sync error
 /// </summary>
 /// <param name="error">Error to remove</param>
 public void RemoveSyncError(SyncError error)
 {
     SyncErrors.Remove(error);
 }