@@ -58,7 +58,7 @@ public static RestResponse<T> FromResponse(RestResponse response)
5858/// <summary>
5959/// Container for data sent back from API
6060/// </summary>
61- [ DebuggerDisplay ( "{" + nameof ( DebuggerDisplay ) + "() }") ]
61+ [ DebuggerDisplay ( $ "{{{ nameof(DebuggerDisplay)}()} }") ]
6262public class RestResponse : RestResponseBase {
6363 internal static async Task < RestResponse > FromHttpResponse (
6464 HttpResponseMessage httpResponse ,
@@ -72,7 +72,7 @@ CancellationToken cancellationToken
7272
7373 async Task < RestResponse > GetDefaultResponse ( ) {
7474 var readTask = request . ResponseWriter == null ? ReadResponse ( ) : ReadAndConvertResponse ( ) ;
75- #if NETSTANDARD
75+ #if NETSTANDARD || NETFRAMEWORK
7676 using var stream = await readTask . ConfigureAwait ( false ) ;
7777#else
7878 await using var stream = await readTask . ConfigureAwait ( false ) ;
@@ -105,7 +105,7 @@ async Task<RestResponse> GetDefaultResponse() {
105105 Exception ? MaybeException ( )
106106 => httpResponse . IsSuccessStatusCode
107107 ? null
108- #if NETSTANDARD
108+ #if NETSTANDARD || NETFRAMEWORK
109109 : new HttpRequestException ( $ "Request failed with status code { httpResponse . StatusCode } ") ;
110110#else
111111 : new HttpRequestException ( $ "Request failed with status code { httpResponse . StatusCode } ", null , httpResponse . StatusCode ) ;
@@ -114,7 +114,7 @@ async Task<RestResponse> GetDefaultResponse() {
114114 Task < Stream ? > ReadResponse ( ) => httpResponse . ReadResponse ( cancellationToken ) ;
115115
116116 async Task < Stream ? > ReadAndConvertResponse ( ) {
117- #if NETSTANDARD
117+ #if NETSTANDARD || NETFRAMEWORK
118118 using var original = await ReadResponse ( ) . ConfigureAwait ( false ) ;
119119#else
120120 await using var original = await ReadResponse ( ) . ConfigureAwait ( false ) ;
0 commit comments