private static IAmazonS3 GetS3Client(S3Options options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } if (options.KeyId == null) { throw new ArgumentNullException(nameof(options.KeyId)); } if (options.SecretKey == null) { throw new ArgumentNullException(nameof(options.SecretKey)); } if (options.Region == null) { throw new ArgumentNullException(nameof(options.Region)); } return(new AmazonS3Client(options.KeyId, options.SecretKey, RegionEndpoint.GetBySystemName(options.Region))); }
public S3FileStorage(S3Options options) : this(GetS3Client(options), options.BucketName) { // No-op. }