private void TraverseServerFileList(FolderNode folderNode) { foreach (var fileNode in folderNode.FileList) { if (!fileListCache.ContainsKey(fileNode.Id)) { fileListCache[fileNode.Id] = fileNode; } foreach (var weakChecksum in fileNode.WeakChecksumList) { if (!serverChecksumList.ContainsKey(weakChecksum)) { serverChecksumList[weakChecksum] = new List<String>(); } serverChecksumList[weakChecksum].Add(weakChecksum); } } }
private void InitServerFileList() { logger.Info("Handling server file list..."); if (String.IsNullOrEmpty(FileList)) { serverTree = new FolderNode(); return; } serverTree = SerializerHelper.DeserializeByDataContractSerializer<FolderNode>(FileList); if (serverTree == null) { throw new Exception("The folder node of server is null."); } }