The following code causes ReSharper (3.0.2) to highlight the second reference to 'group' (Check.Require(group.Id..) as a possible null reference exception.
public void Create(Group group)
Check.Require(group != null, "group must not be null", log);
Check.Require(group.Id == 0, "group must be new", log);
It would be nice if the value analysis used to detect possible null references could be enhanced to allow a user-defined pattern (for example, in my case, the 'Check.Require(group != null...' .
I've been told that this is possible with Value Analysis, but can't find any examples. Having played around with adding the method as an assertion I can see an effect, but not the one I'm looking for.
Can anyone provide an example of how to set this up?