protected override void CloseSession() { StatProvider.SetNewState(SyncStates.ClosingSession); // TODO Should be manage by client sync not by SyncMode if (SyncType != SyncTypes.OneWay) { SyncSession.HasSuccess = true; var syncSessionRepo = new SyncSessionInfoRepository(DataStore); syncSessionRepo.Save(SyncSession); } Transport.Send <bool>(true); }
private void SyncServerChange() { if (SyncType == SyncTypes.OneWay) { return; } Conflicts.RemoveInvolve(LocalEntitiesChangeset); StatProvider.SetNewState(SyncStates.SendingServerChange, Transport); Transport.Send(LocalEntitiesChangeset); StatProvider.SetNewState(SyncStates.SendingConflictsSolved, Transport); Transport.Send(Conflicts); }
private void Work() { try { InitSync(); Conflicts = SyncRemoteChange(); DetermineTypeOfSync(); SyncServerChange(); FinalizeSync(); } catch (Exception ex) { ErrorOccurs = true; Logger.Error(ex); StatProvider.SetNewState(SyncStates.InError); } finally { IsSyncInProgress = false; } }
protected virtual void EstablishNewSession() { StatProvider.SetNewState(SyncStates.EstablishNewSession); }
protected virtual void DetermineTypeOfSync() { StatProvider.SetNewState(SyncStates.DetermineTypeOfSync); }
protected override void CleanEntities() { StatProvider.SetNewState(SyncStates.CleanEntites); CleanEntities(DataStore, SyncSession.HighBoundaryAnchor); }