Skip to content

Commit 7ee9e16

Browse files
committed
The ClientOptions can not be get; init;
1 parent a61e19d commit 7ee9e16

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

src/ImageSharp.Web.Providers.AWS/Caching/AWSS3StorageCache.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Web.Caching.AWS;
1616
public class AWSS3StorageCache : IImageCache
1717
{
1818
private readonly IAmazonS3 amazonS3Client;
19-
private readonly string? bucket;
19+
private readonly string bucket;
2020

2121
/// <summary>
2222
/// Initializes a new instance of the <see cref="AWSS3StorageCache"/> class.

src/ImageSharp.Web.Providers.AWS/Caching/AWSS3StorageCacheOptions.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ namespace SixLabors.ImageSharp.Web.Caching.AWS;
99
public class AWSS3StorageCacheOptions : IAWSS3BucketClientOptions
1010
{
1111
/// <inheritdoc/>
12-
public string? Region { get; init; }
12+
public string? Region { get; set; }
1313

1414
/// <inheritdoc/>
15-
public string BucketName { get; init; } = null!;
15+
public string BucketName { get; set; } = null!;
1616

1717
/// <inheritdoc/>
18-
public string? AccessKey { get; init; }
18+
public string? AccessKey { get; set; }
1919

2020
/// <inheritdoc/>
21-
public string? AccessSecret { get; init; }
21+
public string? AccessSecret { get; set; }
2222

2323
/// <inheritdoc/>
24-
public string? Endpoint { get; init; }
24+
public string? Endpoint { get; set; }
2525

2626
/// <inheritdoc/>
27-
public bool UseAccelerateEndpoint { get; init; }
27+
public bool UseAccelerateEndpoint { get; set; }
2828

2929
/// <inheritdoc/>
30-
public TimeSpan? Timeout { get; init; }
30+
public TimeSpan? Timeout { get; set; }
3131
}

src/ImageSharp.Web.Providers.AWS/IAWSS3BucketClientOptions.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,44 @@ namespace SixLabors.ImageSharp.Web;
99
internal interface IAWSS3BucketClientOptions
1010
{
1111
/// <summary>
12-
/// Gets the AWS region endpoint (us-east-1/us-west-1/ap-southeast-2).
12+
/// Gets or sets the AWS region endpoint (us-east-1/us-west-1/ap-southeast-2).
1313
/// </summary>
14-
string? Region { get; init; }
14+
string? Region { get; set; }
1515

1616
/// <summary>
17-
/// Gets the AWS bucket name.
17+
/// Gets or sets the AWS bucket name.
1818
/// </summary>
19-
string BucketName { get; init; }
19+
string BucketName { get; set; }
2020

2121
/// <summary>
22-
/// Gets the AWS key - Can be used to override keys provided by the environment.
22+
/// Gets or sets the AWS key - Can be used to override keys provided by the environment.
2323
/// If deploying inside an EC2 instance AWS keys will already be available via environment
2424
/// variables and don't need to be specified. Follow AWS best security practices on <see href="https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html"/>.
2525
/// </summary>
26-
string? AccessKey { get; init; }
26+
string? AccessKey { get; set; }
2727

2828
/// <summary>
29-
/// Gets the AWS endpoint - used to override the default service endpoint.
29+
/// Gets or sets the AWS endpoint - used to override the default service endpoint.
3030
/// If deploying inside an EC2 instance AWS keys will already be available via environment
3131
/// variables and don't need to be specified. Follow AWS best security practices on <see href="https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html"/>.
3232
/// </summary>
33-
string? AccessSecret { get; init; }
33+
string? AccessSecret { get; set; }
3434

3535
/// <summary>
36-
/// Gets the AWS endpoint - used for testing to over region endpoint allowing it
36+
/// Gets or sets the AWS endpoint - used for testing to over region endpoint allowing it
3737
/// to be set to localhost.
3838
/// </summary>
39-
string? Endpoint { get; init; }
39+
string? Endpoint { get; set; }
4040

4141
/// <summary>
42-
/// Gets a value indicating whether the S3 accelerate endpoint is used.
42+
/// Gets or sets a value indicating whether the S3 accelerate endpoint is used.
4343
/// The feature must be enabled on the bucket. Follow AWS instruction on <see href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/transfer-acceleration.html"/>.
4444
/// </summary>
45-
bool UseAccelerateEndpoint { get; init; }
45+
bool UseAccelerateEndpoint { get; set; }
4646

4747
/// <summary>
48-
/// Gets a value indicating the timeout for the S3 client.
48+
/// Gets or sets a value indicating the timeout for the S3 client.
4949
/// If the value is set, the value is assigned to the Timeout property of the HttpWebRequest/HttpClient object used to send requests.
5050
/// </summary>
51-
TimeSpan? Timeout { get; init; }
51+
TimeSpan? Timeout { get; set; }
5252
}

src/ImageSharp.Web.Providers.AWS/Providers/AWSS3StorageImageProviderOptions.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@ public class AWSS3StorageImageProviderOptions
2020
public class AWSS3BucketClientOptions : IAWSS3BucketClientOptions
2121
{
2222
/// <inheritdoc/>
23-
public string? Region { get; init; }
23+
public string? Region { get; set; }
2424

2525
/// <inheritdoc/>
26-
public string BucketName { get; init; } = null!;
26+
public string BucketName { get; set; } = null!;
2727

2828
/// <inheritdoc/>
29-
public string? AccessKey { get; init; }
29+
public string? AccessKey { get; set; }
3030

3131
/// <inheritdoc/>
32-
public string? AccessSecret { get; init; }
32+
public string? AccessSecret { get; set; }
3333

3434
/// <inheritdoc/>
35-
public string? Endpoint { get; init; }
35+
public string? Endpoint { get; set; }
3636

3737
/// <inheritdoc/>
38-
public bool UseAccelerateEndpoint { get; init; }
38+
public bool UseAccelerateEndpoint { get; set; }
3939

4040
/// <inheritdoc/>
41-
public TimeSpan? Timeout { get; init; }
41+
public TimeSpan? Timeout { get; set; }
4242
}

0 commit comments

Comments
 (0)