@@ -58,7 +58,7 @@ public static RestResponse<T> FromResponse(RestResponse response)
58
58
/// <summary>
59
59
/// Container for data sent back from API
60
60
/// </summary>
61
- [ DebuggerDisplay ( "{" + nameof ( DebuggerDisplay ) + "() }") ]
61
+ [ DebuggerDisplay ( $ "{{{ nameof(DebuggerDisplay)}()} }") ]
62
62
public class RestResponse : RestResponseBase {
63
63
internal static async Task < RestResponse > FromHttpResponse (
64
64
HttpResponseMessage httpResponse ,
@@ -72,7 +72,7 @@ CancellationToken cancellationToken
72
72
73
73
async Task < RestResponse > GetDefaultResponse ( ) {
74
74
var readTask = request . ResponseWriter == null ? ReadResponse ( ) : ReadAndConvertResponse ( ) ;
75
- #if NETSTANDARD
75
+ #if NETSTANDARD || NETFRAMEWORK
76
76
using var stream = await readTask . ConfigureAwait ( false ) ;
77
77
#else
78
78
await using var stream = await readTask . ConfigureAwait ( false ) ;
@@ -105,7 +105,7 @@ async Task<RestResponse> GetDefaultResponse() {
105
105
Exception ? MaybeException ( )
106
106
=> httpResponse . IsSuccessStatusCode
107
107
? null
108
- #if NETSTANDARD
108
+ #if NETSTANDARD || NETFRAMEWORK
109
109
: new HttpRequestException ( $ "Request failed with status code { httpResponse . StatusCode } ") ;
110
110
#else
111
111
: new HttpRequestException ( $ "Request failed with status code { httpResponse . StatusCode } ", null , httpResponse . StatusCode ) ;
@@ -114,7 +114,7 @@ async Task<RestResponse> GetDefaultResponse() {
114
114
Task < Stream ? > ReadResponse ( ) => httpResponse . ReadResponse ( cancellationToken ) ;
115
115
116
116
async Task < Stream ? > ReadAndConvertResponse ( ) {
117
- #if NETSTANDARD
117
+ #if NETSTANDARD || NETFRAMEWORK
118
118
using var original = await ReadResponse ( ) . ConfigureAwait ( false ) ;
119
119
#else
120
120
await using var original = await ReadResponse ( ) . ConfigureAwait ( false ) ;
0 commit comments