-
Notifications
You must be signed in to change notification settings - Fork 167
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
UNITY - Add missing BSON types to preserve list for Custom User Data #2519
Conversation
41dfaeb
to
99e9e1d
Compare
@@ -99,6 +100,9 @@ internal static void PreserveSerializers() | |||
_ = new BsonArraySerializer(); | |||
|
|||
_ = new ObjectSerializer(); | |||
|
|||
_ = new EnumerableInterfaceImplementerSerializer<IList<object>, object>(); | |||
_ = new ExpandoObjectSerializer(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What code did you write where the ExpandoObjectSerializer
was needed? As far as I know, ExpandoObject
is not supported on Unity, so I'm kind of surprised we ended up with a code path that reaches its serializer, although it's possible that it's just a fallback and the bson library uses it for non-expando objects as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll put the code in a repo for you to take a look.
@@ -99,6 +100,9 @@ internal static void PreserveSerializers() | |||
_ = new BsonArraySerializer(); | |||
|
|||
_ = new ObjectSerializer(); | |||
|
|||
_ = new EnumerableInterfaceImplementerSerializer<IList<object>, object>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be EnumerableInterfaceImplementerSerializer<IEnumerable<object>, object>
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try it out and report back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're correct. It works with IEnumerable as well.
@LaPeste let's merge this - I haven't had the time to test it, but I'm guessing it works. |
1654259
to
250fac3
Compare
Pull Request Test Coverage Report for Build 1385445790
💛 - Coveralls |
Description
When tried Custom User data in Unity, 2 BSON types were not being preserved. This PR adds those 2 missing types
Fixes #
no issue was created for this