public GetObjectRequest(string bucketName, string key) { if (string.IsNullOrEmpty(bucketName)) { throw new ArgumentException(OssResources.ExceptionIfArgumentStringIsNullOrEmpty, "bucketName"); } if (string.IsNullOrEmpty(key)) { throw new ArgumentException(OssResources.ExceptionIfArgumentStringIsNullOrEmpty, "key"); } if (!OssUtils.IsBucketNameValid(bucketName)) { throw new ArgumentException(OssResources.BucketNameInvalid, "bucketName"); } if (!OssUtils.IsObjectKeyValid(key)) { throw new ArgumentException(OssResources.ObjectKeyInvalid, "key"); } this.BucketName = bucketName; this.Key = key; }