How can I tell ReSharper that I am using a shell for Debug.Assert to avoid empty ref links?

So, I had Debug.Assertaround my code, but now I created DebugHelper.Assertone which itself has some entries and Debug.Assert, but now I get 1 million warnings that something might be null.

Is it possible to tell ReSharper that the execution is the DebugHelper.Assertsame Debug.Assertand thus get rid of warnings?

EDIT: I would really like (or maybe have to) avoid adding another dependency for the project just for that.

+4
source share
1 answer

DebugHelper.Assert. JetBrains.Annotations , - :

[ContractAnnotation("condition:false => halt")]
public void Assert(bool condition)
{
  // ...
}

ReSharper, condition false, . , ReSharper Debug.Assert ( "" XML , inline ).

JetBrains.Annotations - . .

+3

Source: https://habr.com/ru/post/1670729/


All Articles