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

Annotate OpenIddictParameter.IsNullOrEmpty() with [MemberNotNullWhen] #1118

Closed
kevinchalet opened this issue Oct 6, 2020 · 1 comment
Closed
Assignees
Labels

Comments

@kevinchalet
Copy link
Member

Adding this annotation should help the compiler figure out that the read-only OpenIddictParameter.Value property is guaranteed to be non-null when the static OpenIddictParameter.IsNullOrEmpty() method is called and returns false:

https://github.com/openiddict/openiddict-core/pull/1116/files#diff-492dc35074f45f4b59b533626ee53171R271

Note: ReferenceAssemblyAnnotator doesn't include this attribute yet, but I opened tunnelvisionlabs/ReferenceAssemblyAnnotator#84 to suggest adding it.

@kevinchalet
Copy link
Member Author

Closing, as it looks like this attribute has no effect on static methods.

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

No branches or pull requests

1 participant