Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 1671: Add MemberNotNullWhen attribute for Content property in IApiResponse<T> #1672

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sguryev
Copy link

@sguryev sguryev commented Feb 22, 2024

Potential fix for #1671

An alternative way:
new bool IsSuccessStatusCode { get; } property in the IApiResponse<T> interface with all 3 attributes above

@HavenDV
Copy link

HavenDV commented Feb 22, 2024

This is similar to Breaking Change because IApiResponse<out T> is no longer IApiResponse and this may affect those using such a cast.

I suggest doing this via virtual, like here - https://stackoverflow.com/questions/72232151/membernotnullwhen-or-other-code-analysis-attributes-for-inherited-members

For some reason I was sure that it was possible to use virtual. Ok, then we should consider using new, but this can also cause some problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants