22// Licensed under the MIT License.
33
44using System ;
5+ using System . Diagnostics . CodeAnalysis ;
56using System . Net . Http ;
67using System . Security . Claims ;
78using System . Threading ;
@@ -14,6 +15,9 @@ namespace Microsoft.Identity.Web
1415 internal partial class DownstreamApi : IDownstreamApi
1516 {
1617 /// <inheritdoc/>
18+ #if NET6_0_OR_GREATER
19+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
20+ #endif
1721 public async Task < TOutput ? > GetForUserAsync < TOutput > (
1822 string ? serviceName ,
1923 Action < DownstreamApiOptionsReadOnlyHttpMethod > ? downstreamApiOptionsOverride = null ,
@@ -41,6 +45,9 @@ ex is InvalidOperationException
4145 }
4246
4347 /// <inheritdoc/>
48+ #if NET6_0_OR_GREATER
49+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
50+ #endif
4451 public async Task < TOutput ? > GetForUserAsync < TInput , TOutput > (
4552 string ? serviceName ,
4653 TInput input ,
@@ -76,6 +83,9 @@ ex is InvalidOperationException
7683 }
7784
7885 /// <inheritdoc/>
86+ #if NET6_0_OR_GREATER
87+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
88+ #endif
7989 public async Task < TOutput ? > GetForAppAsync < TOutput > (
8090 string ? serviceName ,
8191 Action < DownstreamApiOptionsReadOnlyHttpMethod > ? downstreamApiOptionsOverride = null ,
@@ -102,6 +112,9 @@ ex is InvalidOperationException
102112 }
103113
104114 /// <inheritdoc/>
115+ #if NET6_0_OR_GREATER
116+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
117+ #endif
105118 public async Task < TOutput ? > GetForAppAsync < TInput , TOutput > (
106119 string ? serviceName ,
107120 TInput input ,
@@ -136,6 +149,9 @@ ex is InvalidOperationException
136149 }
137150
138151 /// <inheritdoc/>
152+ #if NET6_0_OR_GREATER
153+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
154+ #endif
139155 public async Task PostForUserAsync < TInput > (
140156 string ? serviceName ,
141157 TInput input ,
@@ -169,6 +185,9 @@ ex is InvalidOperationException
169185 }
170186
171187 /// <inheritdoc/>
188+ #if NET6_0_OR_GREATER
189+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
190+ #endif
172191 public async Task < TOutput ? > PostForUserAsync < TInput , TOutput > (
173192 string ? serviceName ,
174193 TInput input ,
@@ -204,6 +223,9 @@ ex is InvalidOperationException
204223 }
205224
206225 /// <inheritdoc/>
226+ #if NET6_0_OR_GREATER
227+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
228+ #endif
207229 public async Task PostForAppAsync < TInput > (
208230 string ? serviceName ,
209231 TInput input ,
@@ -236,6 +258,9 @@ ex is InvalidOperationException
236258 }
237259
238260 /// <inheritdoc/>
261+ #if NET6_0_OR_GREATER
262+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
263+ #endif
239264 public async Task < TOutput ? > PostForAppAsync < TInput , TOutput > (
240265 string ? serviceName ,
241266 TInput input ,
@@ -270,6 +295,9 @@ ex is InvalidOperationException
270295 }
271296
272297 /// <inheritdoc/>
298+ #if NET6_0_OR_GREATER
299+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
300+ #endif
273301 public async Task PutForUserAsync < TInput > (
274302 string ? serviceName ,
275303 TInput input ,
@@ -303,6 +331,9 @@ ex is InvalidOperationException
303331 }
304332
305333 /// <inheritdoc/>
334+ #if NET6_0_OR_GREATER
335+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
336+ #endif
306337 public async Task < TOutput ? > PutForUserAsync < TInput , TOutput > (
307338 string ? serviceName ,
308339 TInput input ,
@@ -338,6 +369,9 @@ ex is InvalidOperationException
338369 }
339370
340371 /// <inheritdoc/>
372+ #if NET6_0_OR_GREATER
373+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
374+ #endif
341375 public async Task PutForAppAsync < TInput > (
342376 string ? serviceName ,
343377 TInput input ,
@@ -370,6 +404,9 @@ ex is InvalidOperationException
370404 }
371405
372406 /// <inheritdoc/>
407+ #if NET6_0_OR_GREATER
408+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
409+ #endif
373410 public async Task < TOutput ? > PutForAppAsync < TInput , TOutput > (
374411 string ? serviceName ,
375412 TInput input ,
@@ -406,6 +443,9 @@ ex is InvalidOperationException
406443#if ! NETFRAMEWORK && ! NETSTANDARD2_0
407444
408445 /// <inheritdoc/>
446+ #if NET6_0_OR_GREATER
447+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
448+ #endif
409449 public async Task PatchForUserAsync < TInput > (
410450 string ? serviceName ,
411451 TInput input ,
@@ -439,6 +479,9 @@ ex is InvalidOperationException
439479 }
440480
441481 /// <inheritdoc/>
482+ #if NET6_0_OR_GREATER
483+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
484+ #endif
442485 public async Task < TOutput ? > PatchForUserAsync < TInput , TOutput > (
443486 string ? serviceName ,
444487 TInput input ,
@@ -474,6 +517,9 @@ ex is InvalidOperationException
474517 }
475518
476519 /// <inheritdoc/>
520+ #if NET6_0_OR_GREATER
521+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
522+ #endif
477523 public async Task PatchForAppAsync < TInput > (
478524 string ? serviceName ,
479525 TInput input ,
@@ -506,6 +552,9 @@ ex is InvalidOperationException
506552 }
507553
508554 /// <inheritdoc/>
555+ #if NET6_0_OR_GREATER
556+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
557+ #endif
509558 public async Task < TOutput ? > PatchForAppAsync < TInput , TOutput > (
510559 string ? serviceName ,
511560 TInput input ,
@@ -542,6 +591,9 @@ ex is InvalidOperationException
542591#endif // !NETFRAMEWORK && !NETSTANDARD2_0
543592
544593 /// <inheritdoc/>
594+ #if NET6_0_OR_GREATER
595+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
596+ #endif
545597 public async Task DeleteForUserAsync < TInput > (
546598 string ? serviceName ,
547599 TInput input ,
@@ -575,6 +627,9 @@ ex is InvalidOperationException
575627 }
576628
577629 /// <inheritdoc/>
630+ #if NET6_0_OR_GREATER
631+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
632+ #endif
578633 public async Task < TOutput ? > DeleteForUserAsync < TInput , TOutput > (
579634 string ? serviceName ,
580635 TInput input ,
@@ -610,6 +665,9 @@ ex is InvalidOperationException
610665 }
611666
612667 /// <inheritdoc/>
668+ #if NET6_0_OR_GREATER
669+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
670+ #endif
613671 public async Task DeleteForAppAsync < TInput > (
614672 string ? serviceName ,
615673 TInput input ,
@@ -642,6 +700,9 @@ ex is InvalidOperationException
642700 }
643701
644702 /// <inheritdoc/>
703+ #if NET6_0_OR_GREATER
704+ [ RequiresUnreferencedCode ( "Calls Microsoft.Identity.Web.DownstreamApi.DeserializeOutput<TOutput>(response, effectiveOptions)" ) ]
705+ #endif
645706 public async Task < TOutput ? > DeleteForAppAsync < TInput , TOutput > (
646707 string ? serviceName ,
647708 TInput input ,
0 commit comments