Пример #1
0
        /// <summary>
        /// 从文件记录构建上传进度对象
        /// </summary>
        /// <param name="jsonData">文件内容</param>
        /// <returns>上传进度对象</returns>
        public static ResumeRecord fromJsonData(string jsonData)
        {
            ResumeRecord record = JsonConvert.DeserializeObject <ResumeRecord>(jsonData);

            return(record);
        }
Пример #2
0
 private void record(long offset)
 {
     if (this.resumeRecorder == null || offset == 0)
     {
         return;
     }
     ResumeRecord r = new ResumeRecord(this.size, offset, this.lastModifyTime, this.contexts);
     this.resumeRecorder.set(this.recordKey, Encoding.UTF8.GetBytes(r.toJsonData()));
 }