Amazon.S3.Transfer.Internal.MultipartUploadCommand.MultipartUploadCommand C# (CSharp) Метод

MultipartUploadCommand() приватный Метод

Initializes a new instance of the MultipartUploadCommand class.
private MultipartUploadCommand ( IAmazonS3 s3Client, TransferUtilityConfig config, TransferUtilityUploadRequest fileTransporterRequest ) : System
s3Client IAmazonS3 The s3 client.
config TransferUtilityConfig The config object that has the number of threads to use.
fileTransporterRequest TransferUtilityUploadRequest The file transporter request.
Результат System
        internal MultipartUploadCommand(IAmazonS3 s3Client, TransferUtilityConfig config, TransferUtilityUploadRequest fileTransporterRequest)
        {
            this._config = config;

            if (fileTransporterRequest.IsSetFilePath())
            {
                _logger.DebugFormat("Beginning upload of file {0}.", fileTransporterRequest.FilePath);
            }
            else
            {
                _logger.DebugFormat("Beginning upload of stream.");
            }

            this._s3Client = s3Client;
            this._fileTransporterRequest = fileTransporterRequest;
            this._contentLength = this._fileTransporterRequest.ContentLength;



            if (fileTransporterRequest.IsSetPartSize())
                this._partSize = fileTransporterRequest.PartSize;
            else
                this._partSize = calculatePartSize(this._contentLength);

            if (fileTransporterRequest.InputStream != null)
            {
                if (fileTransporterRequest.AutoResetStreamPosition && fileTransporterRequest.InputStream.CanSeek)
                {
                    fileTransporterRequest.InputStream.Seek(0, SeekOrigin.Begin);
                }
            }

            _logger.DebugFormat("Upload part size {0}.", this._partSize);
        }