Skip to content

Commit

Permalink
Fix Added MemberNotNullWhen in IApiResponse (#1483)
Browse files Browse the repository at this point in the history
* Added MemberNotNullWhen in IApiResponse

* Update ApiResponse.cs

---------

Co-authored-by: Glenn <5834289+glennawatson@users.noreply.github.com>
  • Loading branch information
AlbertoMonteiro and glennawatson authored Apr 12, 2023
1 parent c1516a8 commit ed61774
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Refit/ApiResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ public interface IApiResponse : IDisposable
/// <summary>
/// Indicates whether the request was successful.
/// </summary>
#if NET5_0_OR_GREATER
[MemberNotNullWhen(true, nameof(ContentHeaders))]
[MemberNotNullWhen(false, nameof(Error))]
#endif
bool IsSuccessStatusCode { get; }

/// <summary>
Expand Down

0 comments on commit ed61774

Please sign in to comment.