Describe the proposal
Once we ingest the .NET 5.0 SDK we we'll be able to add nullability annotations to most of the methods on DaprClient. The reason we didn't do this because is because prior to the C#9 compiler, a core use case didn't work with nullability:
public Task<TValue> DoSomething<TValue>();
There is no supported way (pre C# 9) to say this method returns a task that might return a null without also constraining TValue : class. We didn't want to block the use of value types at a fundamental level especially when records and structs are about to hit.
Now that this barrier has been removed there will be a benefit to adding NNRT annotations.
Describe the proposal
Once we ingest the .NET 5.0 SDK we we'll be able to add nullability annotations to most of the methods on
DaprClient. The reason we didn't do this because is because prior to the C#9 compiler, a core use case didn't work with nullability:There is no supported way (pre C# 9) to say this method returns a task that might return a null without also constraining
TValue : class. We didn't want to block the use of value types at a fundamental level especially when records and structs are about to hit.Now that this barrier has been removed there will be a benefit to adding NNRT annotations.