Closed aksar9211 closed 2 years ago
As per your suggestions, I have removed the ComparisonStatus enum class and renamed the ComparisonAttribute to IgnoreInComparisonAttribute. I have also updated the unit testes. Please review again.
Yes. I did. All the tests passed except one: File: ComparerGenericEnumerableTests.cs Line no.:550 Assert.AreEqual(DifferenceTypes.MissedElementInFirstObject, differences.First().DifferenceType);
the difference type is: DifferenceTypes.NumberOfElementsMismatch
This test is failing in the original project as well.
Thanks for your contribution
Thank you for merging the code. How to get the nuget package for the same?
Currently the only option is to download the source code. I'm going to release next version within couple of month.
Hi, I downloaded and built the source back in June 2022 just so I could use the [IgnoreInComparison] attribute (which is working perfectly in my project), is there any chance of a new release (nuget package) for these changes in the near future?
Thanks for the great work on this project!
Still working on it. Sorry. A lot of work.
Valerii Tereshchenko, I am using object comparer in my project. I used to list out the ignore member before comparison, but In several cases, there are nested parent-child models that go into the loop recursively and result in StackOverflowException. Also instead of excluding the member at the comparer site, It is more useful for us to specify it at the property and field. So, I am proposing the above solution for this issue. Please consider adding it to the live project.
Usage: