-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
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
Round-tripped log comparison fails if property bag contains DateTime #1689
Comments
The bug title "Generated code for property bag comparison is incorrect" is wrong. What's actually going on is that we're comparing two The unit test creates a
This creates a Now we round-trip the
Nevertheless, the property still works as a
I propose that this is not worth fixing. IMO the more valuable round-tripping scenario is when you read a log file, modify it, and then write it back. In that scenario, you want the parts of the log file that you did not touch to be unaffected. The fix to #1577 ensures this: a property bag property that looks like a
I don't see creating a |
When the generated equality comparer (e.g.,
RunEqualityComparer
) for a generated object model class compares the individualSerializedPropertyInfo
objects in object's property bag, it does an object equality comparison instead of invokingSerializedPropertyInfo.ValueComparer.Equals
. This causes the equality comparer'sEquals
method to incorrectly returnfalse
when comparing two objects with non-empty property bags, even if the property values are identical.To see the problem, uncomment the line
in
PropertyBagConverter_RoundTrip
.Leaving that line uncommented could serve as a regression test for this bug.
@michaelcfanning @ScottLouvau FYI
The text was updated successfully, but these errors were encountered: