[CSHARP-4478] Make FieldValueSerializerHelper class public Created: 12/Jan/23  Updated: 14/Feb/23  Resolved: 14/Feb/23

Status: Closed
Project: C# Driver
Component/s: Serialization
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor - P4
Reporter: Mirko Da Corte Assignee: Robert Stam
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: Improve Serialization
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
2. Would you like the user to see examples of the syntax and/or executable code and its output?
3. Which versions of the driver/connector does this apply to?


 Description   

This class is an helper useful also to who will implement a custom derived version of `FieldDefinition<,>`.



 Comments   
Comment by Robert Stam [ 14/Feb/23 ]

Thank you for your request. We have analyzed how this class is currently used by the driver internally and have found that almost all callers to it are in the LINQ2 implementation. Since we intend to remove LINQ2 eventually it is likely this file will also be removed or altered in some way. Given that, we don't want to make it part of the public API.

Your best work around would be to copy/paste this file into your own code (I would recommend changing the class name to avoid confusion).

Comment by Mirko Da Corte [ 08/Feb/23 ]

Hi,
as you can see here, I'm using this class to implement a custom FieldDefinition based on internal logic of my library https://github.com/Etherna/mongodm/blob/abe2f60adecff6a453d0750659b7d56015fedf39/src/MongODM.Core/FieldDefinition/MemberMapFieldDefinition.cs#L99 .
I'm currently using a forked version of your driver where I've published this class.

Comment by James Kovacs [ 08/Feb/23 ]

Hi, mirko@etherna.io,

Thank you for filing this feature request. As you might imagine, we try to limit our public API surface area to minimize the number of breaking changes as we implement new features and fix issues. We would like to understand your use case a bit better so that we can evaluate whether adding FieldValueSerializerHelper to the public API is the right thing to do. Our hope is that we can provide guidance on how to accomplish your use case using the existing public API. Please provide a brief explanation and some sample code of what you are trying to accomplish.

Sincerely,
James

Comment by Esha Bhargava [ 20/Jan/23 ]

mirko@etherna.io Thank you for reporting this issue. We'll look into it and get back to you soon.

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