Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }