We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is to be able to setup the default comparer for all properties at once.
The text was updated successfully, but these errors were encountered:
Could you elaborate on how you imagine this working? Code examples are helpful too!
Sorry, something went wrong.
If you mean implementation-wise then I will be of not much help, I haven't had a good look at implementing source generators yet.
If you mean usage-wise, instead of
[Equatable] public record MyRecord( [propery: CustomEquality(typeof(MyEqualityComparer)] object property1, [propery: CustomEquality(typeof(MyEqualityComparer)] object property2, [propery: CustomEquality(typeof(MyEqualityComparer)] object property3);
You would write:
[Equatable] [CustomEquality(typeof(MyEqualityComparer))] public record MyRecord(object property1, object property2, object property3);
or
[Equatable] [DefaultComparer(typeof(MyEqualityComparer))] public record MyRecord(object property1, object property2, object property3);
No branches or pull requests
This is to be able to setup the default comparer for all properties at once.
The text was updated successfully, but these errors were encountered: