Ejemplo n.º 1
0
        /// <summary>
        /// valid when FindTask get task with status as Failed
        /// </summary>
        /// <param name="md5"></param>
        /// <param name="errorInfo"></param>
        /// <returns></returns>
        public Boolean GetTaskErrorInfo(String md5, out DownloadTaskErrorInfo errorInfo)
        {
            lock (m_lock)
            {
                Task task;
                if (m_taskMap.TryGetValue(md5, out task))
                {
                    if (task.status.HasError())
                    {
                        errorInfo = task.ToDownloadTaskErrorInfo();
                        return(true);
                    }
                }
            }

            errorInfo = new DownloadTaskErrorInfo();
            return(false);
        }
Ejemplo n.º 2
0
		/// <summary>
		/// valid when FindTask get task with status as Failed
		/// </summary>
		/// <param name="md5"></param>
		/// <param name="errorInfo"></param>
		/// <returns></returns>
		public Boolean GetTaskErrorInfo(String md5, out DownloadTaskErrorInfo errorInfo)
		{
			lock (m_lock)
			{
				Task task;
				if (m_taskMap.TryGetValue(md5, out task))
				{
					if (task.status.HasError())
					{
						errorInfo = task.ToDownloadTaskErrorInfo();
						return true;
					}
				}
			}

			errorInfo = new DownloadTaskErrorInfo();
			return false;
		}