@@ -16,7 +16,7 @@ namespace System.Net.Http.Json
16
16
public static partial class HttpClientJsonExtensions
17
17
{
18
18
[ RequiresUnreferencedCode ( HttpContentJsonExtensions . SerializationUnreferencedCodeMessage ) ]
19
- public static Task < object ? > GetFromJsonAsync ( this HttpClient client , string ? requestUri , [ DynamicallyAccessedMembers ( JsonHelpers . DeserializationMemberTypes ) ] Type type , JsonSerializerOptions ? options , CancellationToken cancellationToken = default )
19
+ public static Task < object ? > GetFromJsonAsync ( this HttpClient client , string ? requestUri , Type type , JsonSerializerOptions ? options , CancellationToken cancellationToken = default )
20
20
{
21
21
if ( client == null )
22
22
{
@@ -28,7 +28,7 @@ public static partial class HttpClientJsonExtensions
28
28
}
29
29
30
30
[ RequiresUnreferencedCode ( HttpContentJsonExtensions . SerializationUnreferencedCodeMessage ) ]
31
- public static Task < object ? > GetFromJsonAsync ( this HttpClient client , Uri ? requestUri , [ DynamicallyAccessedMembers ( JsonHelpers . DeserializationMemberTypes ) ] Type type , JsonSerializerOptions ? options , CancellationToken cancellationToken = default )
31
+ public static Task < object ? > GetFromJsonAsync ( this HttpClient client , Uri ? requestUri , Type type , JsonSerializerOptions ? options , CancellationToken cancellationToken = default )
32
32
{
33
33
if ( client == null )
34
34
{
@@ -40,7 +40,7 @@ public static partial class HttpClientJsonExtensions
40
40
}
41
41
42
42
[ RequiresUnreferencedCode ( HttpContentJsonExtensions . SerializationUnreferencedCodeMessage ) ]
43
- public static Task < TValue ? > GetFromJsonAsync < [ DynamicallyAccessedMembers ( JsonHelpers . DeserializationMemberTypes ) ] TValue > ( this HttpClient client , string ? requestUri , JsonSerializerOptions ? options , CancellationToken cancellationToken = default )
43
+ public static Task < TValue ? > GetFromJsonAsync < TValue > ( this HttpClient client , string ? requestUri , JsonSerializerOptions ? options , CancellationToken cancellationToken = default )
44
44
{
45
45
if ( client == null )
46
46
{
@@ -52,7 +52,7 @@ public static partial class HttpClientJsonExtensions
52
52
}
53
53
54
54
[ RequiresUnreferencedCode ( HttpContentJsonExtensions . SerializationUnreferencedCodeMessage ) ]
55
- public static Task < TValue ? > GetFromJsonAsync < [ DynamicallyAccessedMembers ( JsonHelpers . DeserializationMemberTypes ) ] TValue > ( this HttpClient client , Uri ? requestUri , JsonSerializerOptions ? options , CancellationToken cancellationToken = default )
55
+ public static Task < TValue ? > GetFromJsonAsync < TValue > ( this HttpClient client , Uri ? requestUri , JsonSerializerOptions ? options , CancellationToken cancellationToken = default )
56
56
{
57
57
if ( client == null )
58
58
{
@@ -108,23 +108,23 @@ public static partial class HttpClientJsonExtensions
108
108
}
109
109
110
110
[ RequiresUnreferencedCode ( HttpContentJsonExtensions . SerializationUnreferencedCodeMessage ) ]
111
- public static Task < object ? > GetFromJsonAsync ( this HttpClient client , string ? requestUri , [ DynamicallyAccessedMembers ( JsonHelpers . DeserializationMemberTypes ) ] Type type , CancellationToken cancellationToken = default )
111
+ public static Task < object ? > GetFromJsonAsync ( this HttpClient client , string ? requestUri , Type type , CancellationToken cancellationToken = default )
112
112
=> client . GetFromJsonAsync ( requestUri , type , options : null , cancellationToken ) ;
113
113
114
114
[ RequiresUnreferencedCode ( HttpContentJsonExtensions . SerializationUnreferencedCodeMessage ) ]
115
- public static Task < object ? > GetFromJsonAsync ( this HttpClient client , Uri ? requestUri , [ DynamicallyAccessedMembers ( JsonHelpers . DeserializationMemberTypes ) ] Type type , CancellationToken cancellationToken = default )
115
+ public static Task < object ? > GetFromJsonAsync ( this HttpClient client , Uri ? requestUri , Type type , CancellationToken cancellationToken = default )
116
116
=> client . GetFromJsonAsync ( requestUri , type , options : null , cancellationToken ) ;
117
117
118
118
[ RequiresUnreferencedCode ( HttpContentJsonExtensions . SerializationUnreferencedCodeMessage ) ]
119
- public static Task < TValue ? > GetFromJsonAsync < [ DynamicallyAccessedMembers ( JsonHelpers . DeserializationMemberTypes ) ] TValue > ( this HttpClient client , string ? requestUri , CancellationToken cancellationToken = default )
119
+ public static Task < TValue ? > GetFromJsonAsync < TValue > ( this HttpClient client , string ? requestUri , CancellationToken cancellationToken = default )
120
120
=> client . GetFromJsonAsync < TValue > ( requestUri , options : null , cancellationToken ) ;
121
121
122
122
[ RequiresUnreferencedCode ( HttpContentJsonExtensions . SerializationUnreferencedCodeMessage ) ]
123
- public static Task < TValue ? > GetFromJsonAsync < [ DynamicallyAccessedMembers ( JsonHelpers . DeserializationMemberTypes ) ] TValue > ( this HttpClient client , Uri ? requestUri , CancellationToken cancellationToken = default )
123
+ public static Task < TValue ? > GetFromJsonAsync < TValue > ( this HttpClient client , Uri ? requestUri , CancellationToken cancellationToken = default )
124
124
=> client . GetFromJsonAsync < TValue > ( requestUri , options : null , cancellationToken ) ;
125
125
126
126
[ RequiresUnreferencedCode ( HttpContentJsonExtensions . SerializationUnreferencedCodeMessage ) ]
127
- private static async Task < object ? > GetFromJsonAsyncCore ( Task < HttpResponseMessage > taskResponse , [ DynamicallyAccessedMembers ( JsonHelpers . DeserializationMemberTypes ) ] Type type , JsonSerializerOptions ? options , CancellationToken cancellationToken )
127
+ private static async Task < object ? > GetFromJsonAsyncCore ( Task < HttpResponseMessage > taskResponse , Type type , JsonSerializerOptions ? options , CancellationToken cancellationToken )
128
128
{
129
129
using ( HttpResponseMessage response = await taskResponse . ConfigureAwait ( false ) )
130
130
{
@@ -146,7 +146,7 @@ public static partial class HttpClientJsonExtensions
146
146
}
147
147
148
148
[ RequiresUnreferencedCode ( HttpContentJsonExtensions . SerializationUnreferencedCodeMessage ) ]
149
- private static async Task < T ? > GetFromJsonAsyncCore < [ DynamicallyAccessedMembers ( JsonHelpers . DeserializationMemberTypes ) ] T > ( Task < HttpResponseMessage > taskResponse , JsonSerializerOptions ? options , CancellationToken cancellationToken )
149
+ private static async Task < T ? > GetFromJsonAsyncCore < T > ( Task < HttpResponseMessage > taskResponse , JsonSerializerOptions ? options , CancellationToken cancellationToken )
150
150
{
151
151
using ( HttpResponseMessage response = await taskResponse . ConfigureAwait ( false ) )
152
152
{
0 commit comments