public MultiPartDownloadBuilder( int numberOfParts, IDownloadBuilder downloadBuilder, IWebRequestBuilder requestBuilder, IDownloadChecker downloadChecker, List<DownloadRange> alreadyDownloadedRanges) { if (numberOfParts <= 0) throw new ArgumentException("numberOfParts <= 0"); if (downloadBuilder == null) throw new ArgumentNullException("downloadBuilder"); if (requestBuilder == null) throw new ArgumentNullException("requestBuilder"); if (downloadChecker == null) throw new ArgumentNullException("downloadChecker"); this.numberOfParts = numberOfParts; this.downloadBuilder = downloadBuilder; this.requestBuilder = requestBuilder; this.downloadChecker = downloadChecker; this.alreadyDownloadedRanges = alreadyDownloadedRanges ?? new List<DownloadRange>(); }
public MultiPartDownload( Uri url, int bufferSize, int numberOfParts, IDownloadBuilder downloadBuilder, IWebRequestBuilder requestBuilder, IDownloadChecker downloadChecker, List <DownloadRange> alreadyDownloadedRanges) : base(url, bufferSize, null, null, requestBuilder, downloadChecker) { if (numberOfParts <= 0) { throw new ArgumentException("numberOfParts <= 0"); } if (downloadBuilder == null) { throw new ArgumentNullException("downloadBuilder"); } this.numberOfParts = numberOfParts; this.downloadBuilder = downloadBuilder; this.AlreadyDownloadedRanges = alreadyDownloadedRanges ?? new List <DownloadRange>(); if (System.Net.ServicePointManager.DefaultConnectionLimit < numberOfParts) { System.Net.ServicePointManager.DefaultConnectionLimit = numberOfParts; } }
public MultiPartDownloadBuilder( int numberOfParts, IDownloadBuilder downloadBuilder, IWebRequestBuilder requestBuilder, IDownloadChecker downloadChecker, List <DownloadRange> alreadyDownloadedRanges) { if (numberOfParts <= 0) { throw new ArgumentException("numberOfParts <= 0"); } if (downloadBuilder == null) { throw new ArgumentNullException("downloadBuilder"); } if (requestBuilder == null) { throw new ArgumentNullException("requestBuilder"); } if (downloadChecker == null) { throw new ArgumentNullException("downloadChecker"); } this.numberOfParts = numberOfParts; this.downloadBuilder = downloadBuilder; this.requestBuilder = requestBuilder; this.downloadChecker = downloadChecker; this.alreadyDownloadedRanges = alreadyDownloadedRanges ?? new List <DownloadRange>(); }
public MultiPartDownload( Uri url, int bufferSize, int numberOfParts, IDownloadBuilder downloadBuilder, IWebRequestBuilder requestBuilder, IDownloadChecker downloadChecker, List<DownloadRange> alreadyDownloadedRanges) : base(url, bufferSize, null, null, requestBuilder, downloadChecker) { if (numberOfParts <= 0) throw new ArgumentException("numberOfParts <= 0"); if (downloadBuilder == null) throw new ArgumentNullException("downloadBuilder"); this.numberOfParts = numberOfParts; this.downloadBuilder = downloadBuilder; this.AlreadyDownloadedRanges = alreadyDownloadedRanges ?? new List<DownloadRange>(); if (System.Net.ServicePointManager.DefaultConnectionLimit < numberOfParts) { System.Net.ServicePointManager.DefaultConnectionLimit = numberOfParts; } }
public ResumingDownloadBuilder(int timeForHeartbeat, int timeToRetry, int? maxRetries, IDownloadBuilder downloadBuilder) { if (timeForHeartbeat <= 0) throw new ArgumentException("timeForHeartbeat <= 0"); if (timeToRetry <= 0) throw new ArgumentException("timeToRetry <= 0"); if (downloadBuilder == null) throw new ArgumentNullException("downloadBuilder"); this.timeForHeartbeat = timeForHeartbeat; this.timeToRetry = timeToRetry; this.maxRetries = maxRetries; this.downloadBuilder = downloadBuilder; }
public ResumingDownload(Uri url, int bufferSize, int? offset, int? maxReadBytes, int timeForHeartbeat, int timeToRetry, int? maxRetries, IDownloadBuilder downloadBuilder) : base(url, bufferSize, offset, maxReadBytes, null, null) { if (timeForHeartbeat <= 0) throw new ArgumentException("timeForHeartbeat <= 0"); if (timeToRetry <= 0) throw new ArgumentException("timeToRetry <= 0"); if (downloadBuilder == null) throw new ArgumentException("downloadBuilder"); this.timeForHeartbeat = timeForHeartbeat; this.timeToRetry = timeToRetry; this.maxRetries = maxRetries; this.downloadBuilder = downloadBuilder; }
public ResumingDownloadBuilder(int timeForHeartbeat, int timeToRetry, int?maxRetries, IDownloadBuilder downloadBuilder) { if (timeForHeartbeat <= 0) { throw new ArgumentException("timeForHeartbeat <= 0"); } if (timeToRetry <= 0) { throw new ArgumentException("timeToRetry <= 0"); } if (downloadBuilder == null) { throw new ArgumentNullException("downloadBuilder"); } this.timeForHeartbeat = timeForHeartbeat; this.timeToRetry = timeToRetry; this.maxRetries = maxRetries; this.downloadBuilder = downloadBuilder; }
public ResumingDownload(Uri url, int bufferSize, long?offset, long?maxReadBytes, int timeForHeartbeat, int timeToRetry, int?maxRetries, IDownloadBuilder downloadBuilder) : base(url, bufferSize, offset, maxReadBytes, null, null) { if (timeForHeartbeat <= 0) { throw new ArgumentException("timeForHeartbeat <= 0"); } if (timeToRetry <= 0) { throw new ArgumentException("timeToRetry <= 0"); } if (downloadBuilder == null) { throw new ArgumentException("downloadBuilder"); } this.timeForHeartbeat = timeForHeartbeat; this.timeToRetry = timeToRetry; this.maxRetries = maxRetries; this.downloadBuilder = downloadBuilder; }