Is there any way to notify ReSharper that the return value of a local function is NotNull
or CanBeNull
?
Otherwise I need to convert local functions into member functions or turn off the pessimistic nullability checking because they produces tons of warnings.
EDIT
I know that attributes are not supported in local functions, but I wondered that there are any tricks instead.
For example, you can't put an attribute inside a method, but you can disable warning once with comment by writing // ReSharper disable once InconsistentNaming
. I'm looking for a trick like this.