IsSetBucketName() private method

Checks if BucketName property is set.
private IsSetBucketName ( ) : bool
return bool
コード例 #1
0
 void validate(TransferUtilityUploadDirectoryRequest request)
 {
     if (!request.IsSetDirectory())
     {
         throw new ArgumentNullException("directory");
     }
     if (!request.IsSetBucketName())
     {
         throw new ArgumentNullException("bucketName");
     }
     if (!Directory.Exists(request.Directory))
     {
         throw new ArgumentException(string.Format("The directory {0} does not exists!", request.Directory), "directory");
     }
 }
コード例 #2
0
 static void validate(TransferUtilityUploadDirectoryRequest request)
 {
     if (!request.IsSetDirectory())
     {
         throw new InvalidOperationException("Directory not specified");
     }
     if (!request.IsSetBucketName())
     {
         throw new InvalidOperationException("BucketName not specified");
     }
     if (!Directory.Exists(request.Directory))
     {
         throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "The directory {0} does not exists!",
                                                           request.Directory));
     }
 }
コード例 #3
0
 static void validate(TransferUtilityUploadDirectoryRequest request)
 {
     if (!request.IsSetDirectory())
     {
         throw new InvalidOperationException("Directory not specified");
     }
     if (!request.IsSetBucketName())
     {
         throw new InvalidOperationException("BucketName not specified");
     }
     if (!Directory.Exists(request.Directory))
     {
         throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "The directory {0} does not exists!",
             request.Directory));
     }
 }
コード例 #4
0
 void validate(TransferUtilityUploadDirectoryRequest request)
 {
     if (!request.IsSetDirectory())
     {
         throw new ArgumentNullException("directory");
     }
     if (!request.IsSetBucketName())
     {
         throw new ArgumentNullException("bucketName");
     }
     if (!Directory.Exists(request.Directory))
     {
         throw new ArgumentException(string.Format("The directory {0} does not exists!", request.Directory), "directory");
     }
 }
コード例 #5
0
        /// <summary>
        /// 	Uploads the files in directory.  The object key is obtained from the file names
        /// 	inside the directory.
        /// 	For large uploads, the file will be divided and uploaded in parts using 
        /// 	Amazon S3's multipart API.  The parts will be reassembled as one object in
        /// 	Amazon S3.
        /// </summary>
        /// <param name="request">
        /// 	The request that contains all the parameters to upload a directory.
        /// </param>
        public void UploadDirectory(TransferUtilityUploadDirectoryRequest request)
        {
            if (!request.IsSetDirectory())
            {
                throw new ArgumentNullException("directory");
            }
            if (!request.IsSetBucketName())
            {
                throw new ArgumentNullException("bucketName");
            }
            if (!Directory.Exists(request.Directory))
            {
                throw new ArgumentException(string.Format("The directory {0} does not exists!", request.Directory), "directory");
            }

            UploadDirectoryCommand command = new UploadDirectoryCommand(this, request);
            command.Execute();
        }