Skip to content

Conversation

@NeoCSharp
Copy link
Contributor

Comparing a Dictionary with Enum as key the PropertyPath will not result in something like [EnumName].Value.MyProperty instead it will result in Value.MyProperty because ShouldCompareByKeys will return false. Enum is not a simple type even if it is a integer or similar.

…ult in something like [EnumName].Value.MyProperty instead it will result in Value.MyProperty because ShouldCompareByKeys will return false. Enum is not a simple type even if it is a integer or similar.
@GregFinzer
Copy link
Owner

I am no longer the owner of this repository. You will need to contact Kellerman Software.

@lqp168
Copy link

lqp168 commented May 14, 2025

in DataRowComparer.cs

if (dataRow1.IsNull(i))
{
Difference difference = new Difference
{
ParentObject1 = parms.ParentObject1,
ParentObject2 = parms.ParentObject2,
PropertyName = currentBreadCrumb,
Object1Value = "(null)",
Object2Value = NiceString(dataRow2[i]),
Object1 = parms.Object1,
Object2 = parms.Object2
};

  AddDifference(parms.Result, difference);
  //return;
 //It may be necessary to change 'return' to 'continue', otherwise other differences will be ignored
  continue;

}

if (dataRow2.IsNull(i))
{
Difference difference = new Difference
{
ParentObject1 = parms.ParentObject1,
ParentObject2 = parms.ParentObject2,
PropertyName = currentBreadCrumb,
Object1Value = NiceString(dataRow1[i]),
Object2Value = "(null)",
Object1 = parms.Object1,
Object2 = parms.Object2
};

  AddDifference(parms.Result, difference);
  //return;
 //It may be necessary to change 'return' to 'continue', otherwise other differences will be ignored
  continue;

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants