[CSHARP-3315] LINQ3: Serializers should implement Equals Created: 11/Jan/21  Updated: 08/Sep/23

Status: Backlog
Project: C# Driver
Component/s: LINQ3
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Robert Stam Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CSHARP-4337 Use correct serializer for conditiona... Closed
is related to CSHARP-4494 Consider marking ObjectSerializer and... Backlog

 Description   

As part of the Known Serializers strategy we need to compare two serializers to determine if they are equal. Two serializers should be considered equal if they are instances of the same class and they are configured the same (so that their Serialize and Deserialize methods behave identically).



 Comments   
Comment by Robert Stam [ 15/Nov/22 ]

LINQ3 sometimes compares serializers to see if they are "equal".

Two separate serializer instances won't compare equal using reference equality, but the `Equals` method determines whether the two instances are in fact equal in the sense that both instances will serialize/deserialize values in the exact same way.

For example, when comparing two fields as in `x.A == x.B` LINQ3 will verify that `A` and `B` have the same serializer (i.e. preventing you from comparing apples to oranges).

We have implemented a small handful of serializer `Equals` method as needed so far, but we should go ahead and implement them all.

Comment by Jeffrey Yemin [ 27/Sep/21 ]

Moving to backlog until we have a scenario which requires this.

Generated at Wed Feb 07 21:44:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.