protected AsyncUploaderBase(ShareFileClient client, UploadSpecificationRequest uploadSpecificationRequest, IPlatformFile file, FileUploaderConfig config = null, int? expirationDays = null) : base(client, uploadSpecificationRequest, file, expirationDays) { Config = config ?? new FileUploaderConfig(); HashProvider = MD5HashProviderFactory.GetHashProvider().CreateHash(); }
public AsyncScalingFileUploader(ShareFileClient client, UploadSpecificationRequest uploadSpecificationRequest, IPlatformFile file, FileUploaderConfig config = null, int? expirationDays = null) : base(client, uploadSpecificationRequest, file, config, expirationDays) { UploadSpecificationRequest.Raw = true; var chunkConfig = config != null ? config.PartConfig : new FilePartConfig(); partUploader = new ScalingPartUploader(chunkConfig, Config.NumberOfThreads, ExecuteChunkUploadMessage, OnProgress); }
public ScalingFileUploader(ShareFileClient client, UploadSpecificationRequest uploadSpecificationRequest, IPlatformFile file, FileUploaderConfig config = null, int? expirationDays = null) : base(client, uploadSpecificationRequest, file, config, expirationDays) { UploadSpecificationRequest.Raw = true; var partConfig = config != null ? config.PartConfig : new FilePartConfig(); partUploader = new ScalingPartUploader(partConfig, Config.NumberOfThreads, requestMessage => Task.Factory.StartNew(() => ExecuteChunkUploadMessage(requestMessage)), OnProgress); }
public StandardFileUploader( ShareFileClient client, UploadSpecificationRequest uploadSpecificationRequest, Stream stream, FileUploaderConfig config = null, int?expirationDays = null) : base(client, uploadSpecificationRequest, stream, config, expirationDays) { }
public StandardFileUploader( ShareFileClient client, UploadSpecification uploadSpecification, UploadSpecificationRequest uploadSpecificationRequest, Stream stream, FileUploaderConfig config = null) : this(client, uploadSpecificationRequest, stream, config, expirationDays : null) { UploadSpecification = uploadSpecification; }
protected AsyncUploaderBase( ShareFileClient client, UploadSpecificationRequest uploadSpecificationRequest, Stream stream, FileUploaderConfig config = null, int?expirationDays = null) : base(client, uploadSpecificationRequest, stream, config, expirationDays) { HashProvider = MD5HashProviderFactory.GetHashProvider().CreateHash(); }
public AsyncScalingFileUploader( ShareFileClient client, ActiveUploadState activeUploadState, UploadSpecificationRequest uploadSpecificationRequest, Stream stream, FileUploaderConfig config = null) : this(client, uploadSpecificationRequest, stream, config) { this.activeUploadState = activeUploadState; UploadSpecification = activeUploadState.UploadSpecification; }
public AsyncMemoryMappedFileUploader( ShareFileClient client, UploadSpecificationRequest uploadSpecificationRequest, FileStream stream, FileUploaderConfig config = null, ActiveUploadState activeUploadState = null, int?expirationDays = default(int?)) : base(client, uploadSpecificationRequest, stream, config, expirationDays) { hasher = new FileChunkHasher(HashProvider); if (activeUploadState != null) { initialPosition = activeUploadState.BytesUploaded; UploadSpecification = activeUploadState.UploadSpecification; // what happens if the new UploadSpecRequest disagrees with this? } }
public AsyncScalingFileUploader( ShareFileClient client, UploadSpecificationRequest uploadSpecificationRequest, Stream stream, FileUploaderConfig config = null, int?expirationDays = null) : base(client, uploadSpecificationRequest, stream, config, expirationDays) { var chunkConfig = config != null ? config.PartConfig : new FilePartConfig(); partUploader = new ScalingPartUploader( chunkConfig, Config.NumberOfThreads, ExecuteChunkUploadMessage, progressReporter.ReportProgress, client.Logging); }
public ScalingFileUploader( ShareFileClient client, UploadSpecificationRequest uploadSpecificationRequest, Stream stream, FileUploaderConfig config = null, int?expirationDays = null) : base(client, uploadSpecificationRequest, stream, config, expirationDays) { var partConfig = config != null ? config.PartConfig : new FilePartConfig(); partUploader = new ScalingPartUploader( partConfig, Config.NumberOfThreads, (requestMessage, cancelToken) => Task.Factory.StartNew(() => ExecuteChunkUploadMessage(requestMessage, cancelToken)), progressReporter.ReportProgress, client.Logging); }
protected AsyncUploaderBase(ShareFileClient client, UploadSpecificationRequest uploadSpecificationRequest, IPlatformFile file, FileUploaderConfig config = null, int?expirationDays = null) : base(client, uploadSpecificationRequest, file, expirationDays) { Config = config ?? new FileUploaderConfig(); HashProvider = MD5HashProviderFactory.GetHashProvider().CreateHash(); }
public AsyncStandardFileUploader(ShareFileClient client, UploadSpecificationRequest uploadSpecificationRequest, IPlatformFile file, FileUploaderConfig config = null, int?expirationDays = null) : base(client, uploadSpecificationRequest, file, config, expirationDays) { UploadSpecificationRequest.Raw = false; }
public AsyncStandardFileUploader(ShareFileClient client, UploadSpecificationRequest uploadSpecificationRequest, IPlatformFile file, FileUploaderConfig config = null, int? expirationDays = null) : base(client, uploadSpecificationRequest, file, config, expirationDays) { UploadSpecificationRequest.Raw = true; }
public AsyncScalingFileUploader(ShareFileClient client, UploadSpecificationRequest uploadSpecificationRequest, IPlatformFile file, FileUploaderConfig config = null, int?expirationDays = null) : base(client, uploadSpecificationRequest, file, config, expirationDays) { UploadSpecificationRequest.Raw = true; var chunkConfig = config != null ? config.PartConfig : new FilePartConfig(); partUploader = new ScalingPartUploader(chunkConfig, Config.NumberOfThreads, ExecuteChunkUploadMessage, OnProgress); }
protected UploaderBase(ShareFileClient client, UploadSpecificationRequest uploadSpecificationRequest, Stream stream, FileUploaderConfig config, int?expirationDays) { Client = client; UploadSpecificationRequest = uploadSpecificationRequest; FileStream = stream; Config = config ?? new FileUploaderConfig(); if (uploadSpecificationRequest.FileSize != stream.Length) { throw new UploadException("Specified file size does not equal file stream length", UploadStatusCode.Unknown); } ExpirationDays = expirationDays; progressReporter = new TransferProgressReporter(uploadSpecificationRequest.FileSize, Guid.NewGuid().ToString(), Config.ProgressReportInterval); }
public ScalingFileUploader(ShareFileClient client, UploadSpecificationRequest uploadSpecificationRequest, IPlatformFile file, FileUploaderConfig config = null, int?expirationDays = null) : base(client, uploadSpecificationRequest, file, config, expirationDays) { UploadSpecificationRequest.Raw = true; var partConfig = config != null ? config.PartConfig : new FilePartConfig(); partUploader = new ScalingPartUploader(partConfig, Config.NumberOfThreads, requestMessage => Task.Factory.StartNew(() => ExecuteChunkUploadMessage(requestMessage)), OnProgress); }