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

            return(record);
        }
Example #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()));
 }