/// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="urlStr">The URL string from which to download the file.</param>
        /// <param name="savePath">Where the downloaded resource will be saved.</param>
        /// <param name="size">Size in bytes of the resource to download.</param>
        /// <param name="crc32">Expected CRC32 checksum for the content to download.</param>
        /// <param name="callbackSet">Callback set.</param>
        /// <param name="context">Context.</param>
        public DownloadTaskInfo(string urlStr, string savePath, long size, uint?crc32,
                                DownloadCallbackSet callbackSet, object context)
        {
            if (string.IsNullOrEmpty(urlStr))
            {
                throw new ArgumentException("urlStr");
            }

            if (string.IsNullOrEmpty(savePath))
            {
                throw new ArgumentException("savePath");
            }

            UrlStr      = urlStr;
            SavePath    = savePath;
            Size        = size;
            Crc32       = crc32;
            CallbackSet = callbackSet;
            Context     = context;
        }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="urlStr">The URL string from which to download the file.</param>
 /// <param name="savePath">Where the downloaded file will be saved.</param>
 /// <param name="callbackSet">Callback set.</param>
 public DownloadTaskInfo(string urlStr, string savePath, DownloadCallbackSet callbackSet)
     : this(urlStr, savePath, -1, null, callbackSet, null)
 {
     // Empty.
 }