Closed ianmann56 closed 4 years ago
@ianbro thanks for the ideas. Sounds like a good enhancements. I'll think about implementing it in the next version.
Are you accepting PR's if I fork and implement it myself?
Yes. Sound like a reasonable change.
Ignore member methods were added in version 1.4.0
I'm still thinking about adding **With*** methods. Haven't decided yet. Feel free to provide any thoughts about it.
Ignore member methods were added in version 1.4.0
I'm still thinking about adding **With*** methods. Haven't decided yet. Feel free to provide any thoughts about it.
See: https://github.com/ValeraT1982/ObjectsComparer/pull/13#issuecomment-557281492
@ianmann56 I added override/ignore by member filter as you described. Please have a look. If it's what you want I'll publish new version with this change.
@ianmann56 I added override/ignore by member filter as you described. Please have a look. If it's what you want I'll publish new version with this change.
I saw it. Perfect! Thank you so much and sorry for not making the request more clear in the first place.
Allow caller to set fields on which the comparer should ignore. This could be by member name, by member type or by lambda that takes the MemberInfo of the member and a boolean that represents whether or not to ignore the field.
Example interface may look like this:
Assume class Person
Exclude members by name
Exclude members by type
Exclude members based on lambda
Extra
Consider implementing this and the overriding ValueComarers in a builder pattern: