Esempio n. 1
0
        public static SyncStateRootStorage GetOrCreateSyncStateRootStorage(MailboxSession mailboxSession, string protocol, ISyncLogger syncLogger = null)
        {
            if (mailboxSession == null)
            {
                throw new ArgumentNullException("mailboxSession");
            }
            if (protocol == null)
            {
                throw new ArgumentNullException("protocol");
            }
            if (syncLogger == null)
            {
                syncLogger = TracingLogger.Singleton;
            }
            string           protocol2        = protocol + "Root";
            DeviceIdentity   deviceIdentity   = new DeviceIdentity("RootDeviceId", "RootDeviceType", protocol2);
            SyncStateStorage syncStateStorage = SyncStateStorage.Bind(mailboxSession, deviceIdentity, syncLogger);

            if (syncStateStorage == null)
            {
                syncStateStorage = SyncStateStorage.Create(mailboxSession, deviceIdentity, StateStorageFeatures.ContentState, syncLogger);
            }
            return(new SyncStateRootStorage(syncStateStorage));
        }
Esempio n. 2
0
 public static SyncStateStorage Create(MailboxSession mailboxSession, DeviceIdentity deviceIdentity, StateStorageFeatures features, ISyncLogger syncLogger = null)
 {
     return(SyncStateStorage.Create(mailboxSession, deviceIdentity, features, false, syncLogger));
 }