public S3Context(IS3Mediator s3, string bucketName) { S3 = s3 ?? throw new ArgumentNullException(nameof(s3)); if (!Amazon.S3.Util.AmazonS3Util.ValidateV2Bucket(bucketName)) { throw new ArgumentOutOfRangeException(nameof(bucketName), bucketName, "Invalid bucket name."); } BucketName = bucketName; }
public TimeoutHandlingS3Mediator(IS3Mediator inner, TimeSpan timeout) { _inner = inner ?? throw new ArgumentNullException(nameof(inner)); if (timeout != Timeout.InfiniteTimeSpan && (timeout.TotalMilliseconds < 1 || timeout.TotalMilliseconds > int.MaxValue)) { throw new ArgumentOutOfRangeException(nameof(timeout), timeout, "Invalid S3 timeout."); } _timeout = timeout; }
public CancelationHandlingS3Mediator(IS3Mediator inner) { _inner = inner ?? throw new ArgumentNullException(nameof(inner)); }
public S3WriteContext(IS3Mediator s3, string bucketName, S3StorageClass storageClass) : base(s3, bucketName) { StorageClass = storageClass ?? throw new System.ArgumentNullException(nameof(storageClass)); }