[CSHARP-2789] Annotate methods with nullability post-conditions Created: 14/Oct/19 Updated: 31/Mar/22 |
|
| Status: | Backlog |
| Project: | C# Driver |
| Component/s: | API |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | John Knoop | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | C#-8.0 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Description |
|
In order to support codebases that have been upgraded to use C# 8´s new nullable ref types feature, it would be great if you could annotate all methods that may return null, such as FirstOrDefaultAsync, with [return: MaybeNull]. See https://docs.microsoft.com/en-us/dotnet/csharp/nullable-attributes#specify-post-conditions-maybenull-and-notnull for more information. |