private void DownloadFile(TransferParameter parameter) { if (!CreateDownload(parameter)) { Log.Debug("- 无法连接服务器,请确定远程服务器是否可用"); throw new ApplicationException("- 无法连接服务器,请确定远程服务器是否可用"); } Log.Debug("- Start Thread Download"); DownloadFileState.Start(new ThreadProcDelegate(DownloadChunkBlock)); }
private void DownloadFile(TransferParameter parameter) { try { CreateDownload(parameter); Log.Info("Start download file job : {0}, {1}, {2}", parameter.TransferUrl, parameter.LocalFile, parameter.ChunkCount); DownloadFileState.Start(new ThreadProcDelegate(DownloadChunkBlock)); } catch (WebException e) { Log.Warn("- Got an Excetpion {0}", e.ToString()); throw; } }