Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 3
0
 protected override void Setup()
 {
     base.Setup();
     SyncSessionRepository = new SyncSessionInfoRepository(Desktop.DataStore);
 }