Generator.Equals icon indicating copy to clipboard operation
Generator.Equals copied to clipboard

Feature Request: Create comparer for strings

Open skarllot opened this issue 2 years ago • 1 comments

Create comparer for strings:

[StringEquality(StringComparison.OrdinalIgnoreCase)]
public string Name { get; set; }

skarllot avatar Nov 29 '23 23:11 skarllot

Somehow missed this issue for a while. I think this is generally a good idea! Happy to take a PR for it.

In the meantime this could be accomplished with:

[CustomEquality(typeof(StringComparer), nameof(StringComparer.OrdinalIgnoreCase))] 

diegofrata avatar Jan 18 '24 09:01 diegofrata

This is done as part of #55. Should be available on 3.1.0.

diegofrata avatar Feb 02 '24 13:02 diegofrata