コード例 #1
0
        // Token: 0x06000D1B RID: 3355 RVA: 0x000478C8 File Offset: 0x00045AC8
        public static IAutdStatusData Load(GlobalInfo globalInfo, SyncStateStorage syncStateStorage)
        {
            NewAutdStatusData newAutdStatusData = new NewAutdStatusData();

            newAutdStatusData.globalInfo     = globalInfo;
            newAutdStatusData.deviceMetadata = syncStateStorage.DeviceMetadata;
            if (!globalInfo.HasNewAutdData)
            {
                using (AutdStatusData autdStatusData = AutdStatusData.Load(syncStateStorage, false, false))
                {
                    if (autdStatusData != null)
                    {
                        newAutdStatusData.lastPingHeartbeat = autdStatusData.LastPingHeartbeat;
                        newAutdStatusData.DPFolderList      = ((autdStatusData.DPFolderList == null) ? null : new Dictionary <string, PingCommand.DPFolderInfo>(autdStatusData.DPFolderList));
                    }
                }
                newAutdStatusData.deviceMetadataStateChanged = true;
                newAutdStatusData.globalStateModified        = true;
            }
            else
            {
                newAutdStatusData.lastPingHeartbeat = globalInfo.LastPingHeartbeat;
                if (newAutdStatusData.deviceMetadata.PingFolderList != null)
                {
                    newAutdStatusData.DPFolderList = ((newAutdStatusData.deviceMetadata.PingFolderList == null) ? null : new Dictionary <string, PingCommand.DPFolderInfo>((Dictionary <string, PingCommand.DPFolderInfo>)newAutdStatusData.deviceMetadata.PingFolderList));
                }
                newAutdStatusData.deviceMetadataStateChanged = false;
                newAutdStatusData.globalStateModified        = false;
            }
            return(newAutdStatusData);
        }
コード例 #2
0
 // Token: 0x060009C1 RID: 2497 RVA: 0x00039668 File Offset: 0x00037868
 private void LoadSyncState()
 {
     this.folderIdMappingSyncState = base.SyncStateStorage.GetCustomSyncState(new FolderIdMappingSyncStateInfo(), new PropertyDefinition[0]);
     if (this.folderIdMappingSyncState == null || this.folderIdMappingSyncState[CustomStateDatumType.IdMapping] == null)
     {
         CustomSyncState customSyncState = base.SyncStateStorage.GetCustomSyncState(new GlobalSyncStateInfo(), new PropertyDefinition[0]);
         if (customSyncState == null)
         {
             base.SyncStateStorage.DeleteAllSyncStates();
         }
         else
         {
             customSyncState.Dispose();
             using (AutdStatusData autdStatusData = AutdStatusData.Load(base.SyncStateStorage, true, false))
             {
                 if (autdStatusData != null)
                 {
                     base.SyncStateStorage.DeleteAllSyncStates();
                 }
             }
         }
         this.folderIdMappingSyncState = base.SyncStateStorage.CreateCustomSyncState(new FolderIdMappingSyncStateInfo());
         this.folderIdMappingSyncState[CustomStateDatumType.IdMapping]              = new FolderIdMapping();
         this.folderIdMappingSyncState[CustomStateDatumType.FullFolderTree]         = new FolderTree();
         this.folderIdMappingSyncState[CustomStateDatumType.RecoveryFullFolderTree] = this.folderIdMappingSyncState[CustomStateDatumType.FullFolderTree];
     }
 }