public static void InitSyncSessionInfo(IDataStore datastore, IDateTimeManager dateTimeProvider) { var session = SyncSessionInfo.Create(dateTimeProvider, null); session.HasSuccess = true; var syncSessionRepo = new SyncSessionInfoRepository(datastore); datastore.AddTypeSafe <SyncSessionInfo>(); syncSessionRepo.Save(session); }
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); }
protected override void Setup() { base.Setup(); SyncSessionRepository = new SyncSessionInfoRepository(Desktop.DataStore); }