Amazon.S3.Transfer.TransferUtilityUploadRequest.IsSetBucketName C# (CSharp) Method

IsSetBucketName() private method

Checks if BucketName property is set.
private IsSetBucketName ( ) : bool
return bool
        internal bool IsSetBucketName()
        {
            return !System.String.IsNullOrEmpty(this.bucketName);
        }

Usage Example

        void validate(TransferUtilityUploadRequest request)
        {
            if (request == null)
            {
                throw new ArgumentNullException("request");
            }

            if (!request.IsSetBucketName())
            {
                throw new ArgumentNullException("bucketName");
            }

            if (!request.IsSetFilePath() &&
                !request.IsSetInputStream())
            {
                throw new ArgumentException(
                          "Please specify either a Filename or provide a Stream to PUT an object into Amazon S3.");
            }
            if (!request.IsSetKey())
            {
                if (request.IsSetFilePath())
                {
                    request.Key = new FileInfo(request.FilePath).Name;
                }
                else
                {
                    throw new ArgumentException(
                              "The Key property must be specified when using a Stream to upload into Amazon S3.");
                }
            }

            if (request.IsSetFilePath() && !File.Exists(request.FilePath))
            {
                throw new ArgumentException("The file indicated by the FilePath property does not exist!");
            }
        }
All Usage Examples Of Amazon.S3.Transfer.TransferUtilityUploadRequest::IsSetBucketName