You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ValueObject<string>]publicsealedpartialclassEntityName{privatestaticValidationValidate(stringinput)=>!string.IsNullOrWhiteSpace(input)&&input.Length<=50?Validation.Ok:Validation.Invalid("Customer IDs must be greater than 0.");}
run build with analyzers
Expected behaviour
I would expect a pre-null check before calling the comparer
The text was updated successfully, but these errors were encountered:
Hi @DorianGreen - have you got a small repo project as I'm unable to reproduce this. The generated code looks correct : IEqualityComparer has a method signature of bool Equals(T? x, T? y); in my test project.
Maybe it's a mismatch of nullability scopes? What's your project configured for? And what's the nullability of the scope where you value object is declared?
Describe the bug
I am getting the following analyzer warning:
The generated code looks like this:
Steps to reproduce
using Vogen v6.0.0
create a value object:
run build with analyzers
Expected behaviour
I would expect a pre-null check before calling the comparer
The text was updated successfully, but these errors were encountered: