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
@replaysMike@MohammadHadi2031 Thank you for the fast PR and Merge, but I believe that #26 introduced a bug :(. Nested exclude strings not do not exclude the properties now.
I have complex objects that have nested collection properties, I use a list of strings to exclude certain properties (".positions.name", ".positions.locations.id",...) but now they are not excluded, only ones like ".Id", ".Name" correctly exclude.
Here is a simple test that passes on fe9c29f (Previous latest version) but fails on d03f685 (Latest version)
.Id is excluded correctly, but .Bs.Name is not
[Test]publicvoidExcludeByStringTest(){varB1s=newList<B>{new B {Id=10,Name="Test 10"},new B {Id=11,Name="Test 11"}};varB2s=newList<B>{new B {Id=10,Name="Test 10"},new B {Id=12,Name="Test 12"}};varA1=new A();
A1.Id =1;
A1.Bs =B1s;varA2=new A();
A1.Id =2;
A2.Bs =B2s;vardiff= A1.Diff(A2, propertiesToExcludeOrInclude:newstring[]{".Bs.Name",".Id"});
Assert.AreEqual(1, diff.Count);}classA{publicList<B> Bs {get;set;}=newList<B>();publicintId{get;set;}}classB{publicintId{get;set;}publicstringName{get;set;}}
The text was updated successfully, but these errors were encountered:
Indeed it did, I was in a rush that day and didn't double check the tests had passed before pushing a release. Looks like the current build scripts don't detect when the tests fail 😅
@replaysMike @MohammadHadi2031 Thank you for the fast PR and Merge, but I believe that #26 introduced a bug :(. Nested exclude strings not do not exclude the properties now.
I have complex objects that have nested collection properties, I use a list of strings to exclude certain properties (".positions.name", ".positions.locations.id",...) but now they are not excluded, only ones like ".Id", ".Name" correctly exclude.
Here is a simple test that passes on fe9c29f (Previous latest version) but fails on d03f685 (Latest version)
.Id is excluded correctly, but .Bs.Name is not
The text was updated successfully, but these errors were encountered: