Exemplo n.º 1
0
        public WebApiResult <string> Pause <T>(TaskStop request)
        {
            var entity = Log <T> .GetThreadLogEntity(request.GUID);

            if (entity == null)
            {
                return new WebApiResult <string> {
                           success = 0, msg = "该任务不存在"
                }
            }
            ;
            if (entity.Status == "已完成")
            {
                return new WebApiResult <string> {
                           success = 0, msg = "该任务已完成"
                }
            }
            ;
            entity.IsPaused = true;
            entity.TStatus  = 4;
            new Log <T>(entity);
            return(new WebApiResult <string>()
            {
                success = 1, msg = "暂停成功"
            });
        }
    }
}
Exemplo n.º 2
0
 protected virtual void OnTaskStop(TaskStopEventArg e)
 {
     TaskStop?.Invoke(this, e);
 }
Exemplo n.º 3
0
        /// <summary>
        /// 暂停
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public WebApiResult <string> Any(TaskStop request)
        {
            TaskService service = new TaskService();

            return(service.Pause <BaiduMapTileDownloadRequest>(request));
        }