Skip to content

Commit 24650b4

Browse files
authoredMar 5, 2025
Remove the obsolete ReadWriteTimeout property from ClientConfig all targets except .NET Framework 4.7.2 (#3683)
1 parent 9674bd2 commit 24650b4

File tree

8 files changed

+25
-16
lines changed

8 files changed

+25
-16
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"core": {
3+
"changeLogMessages": [
4+
"Remove the obsolete ReadWriteTimeout property from ClientConfig all targets except .NET Framework 4.7.2."
5+
],
6+
"type": "patch",
7+
"updateMinimum": true
8+
}
9+
}

‎sdk/src/Core/Amazon.Runtime/ClientConfig.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ public abstract partial class ClientConfig : IClientConfig
8282
private bool? useFIPSEndpoint;
8383
private bool? disableRequestCompression;
8484
private long? requestMinCompressionSizeBytes;
85-
private TimeSpan? readWriteTimeout = null;
8685
private bool disableHostPrefixInjection = false;
8786
private bool? endpointDiscoveryEnabled = null;
8887
private bool? ignoreConfiguredEndpointUrls;
@@ -1133,6 +1132,9 @@ public int HttpClientCacheSize
11331132
}
11341133
#endif
11351134

1135+
#if NETFRAMEWORK
1136+
private TimeSpan? readWriteTimeout = null;
1137+
11361138
/// <summary>
11371139
/// Overrides the default read-write timeout value.
11381140
/// </summary>
@@ -1145,9 +1147,6 @@ public int HttpClientCacheSize
11451147
/// <exception cref="System.ArgumentOutOfRangeException">The timeout specified is less than or equal to zero and is not Infinite.</exception>
11461148
/// </remarks>
11471149
/// <seealso cref="P:System.Net.HttpWebRequest.ReadWriteTimeout"/>
1148-
#if NETSTANDARD
1149-
[Obsolete("ReadWriteTimeout is not consumed in asynchronous HTTP requests. Please use a cancellation token to handle stream read/write timeouts.")]
1150-
#endif
11511150
public TimeSpan? ReadWriteTimeout
11521151
{
11531152
get { return this.readWriteTimeout; }
@@ -1157,6 +1156,7 @@ public TimeSpan? ReadWriteTimeout
11571156
this.readWriteTimeout = value;
11581157
}
11591158
}
1159+
#endif
11601160

11611161
/// <summary>
11621162
/// Gets and sets of the EndpointProvider property.

‎sdk/src/Services/Glacier/Custom/AmazonGlacierConfig.Extensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ protected override void Initialize()
3434
// Set Timeout and ReadWriteTimeout for Glacier client to max timeout as per-request
3535
// timeouts are not supported.
3636
this.Timeout = ClientConfig.MaxTimeout;
37-
#pragma warning disable CS0612,CS0618
37+
#if NETFRAMEWORK
3838
this.ReadWriteTimeout = ClientConfig.MaxTimeout;
39-
#pragma warning restore CS0612,CS0618
39+
#endif
4040
#endif
4141
base.Initialize();
4242
}

‎sdk/src/Services/IoTJobsDataPlane/Custom/AmazonIoTJobsDataPlaneConfig.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ protected override void Initialize()
3636
// Set Timeout and ReadWriteTimeout for Amazon IoTJobsDataPlane service to max timeout as per-request
3737
// timeouts are not supported.
3838
this.Timeout = ClientConfig.MaxTimeout;
39-
#pragma warning disable CS0612,CS0618
39+
#if NETFRAMEWORK
4040
this.ReadWriteTimeout = ClientConfig.MaxTimeout;
41-
#pragma warning restore CS0612,CS0618
41+
#endif
4242
#endif
4343
}
4444
}

‎sdk/src/Services/KinesisVideoArchivedMedia/Custom/AmazonKinesisVideoArchivedMediaConfig.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ protected override void Initialize()
3636
// Set Timeout and ReadWriteTimeout for Amazon KinesisVideoArchivedMedia service to max timeout as per-request
3737
// timeouts are not supported.
3838
this.Timeout = ClientConfig.MaxTimeout;
39-
#pragma warning disable CS0612,CS0618
39+
#if NETFRAMEWORK
4040
this.ReadWriteTimeout = ClientConfig.MaxTimeout;
41-
#pragma warning restore CS0612, CS0618
41+
#endif
4242
#endif
4343
}
4444
}

‎sdk/src/Services/KinesisVideoMedia/Custom/AmazonKinesisVideoMediaConfig.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ protected override void Initialize()
3636
// Set Timeout and ReadWriteTimeout for Amazon KinesisVideoMedia service to max timeout as per-request
3737
// timeouts are not supported.
3838
this.Timeout = ClientConfig.MaxTimeout;
39-
#pragma warning disable CS0612,CS0618
39+
#if NETFRAMEWORK
4040
this.ReadWriteTimeout = ClientConfig.MaxTimeout;
41-
#pragma warning restore CS0612,CS0618
41+
#endif
4242
#endif
4343
}
4444
}

‎sdk/src/Services/MediaStoreData/Custom/AmazonMediaStoreDataConfig.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ protected override void Initialize()
3636
// Set Timeout and ReadWriteTimeout for Amazon MediaStoreData service to max timeout as per-request
3737
// timeouts are not supported.
3838
this.Timeout = ClientConfig.MaxTimeout;
39-
#pragma warning disable CS0612, CS0618
39+
#if NETFRAMEWORK
4040
this.ReadWriteTimeout = ClientConfig.MaxTimeout;
41-
#pragma warning restore CS0612, CS0618
41+
#endif
4242
#endif
4343
}
4444
}

‎sdk/src/Services/S3/Custom/AmazonS3Config.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ protected override void Initialize()
265265
// Set Timeout and ReadWriteTimeout for S3 to max timeout as per-request
266266
// timeouts are not supported.
267267
this.Timeout = ClientConfig.MaxTimeout;
268-
#pragma warning disable CS0612,CS0618
268+
#if NETFRAMEWORK
269269
this.ReadWriteTimeout = ClientConfig.MaxTimeout;
270-
#pragma warning restore CS0612, CS0618
270+
#endif
271271
#endif
272272
}
273273

0 commit comments

Comments
 (0)
Failed to load comments.