-
Notifications
You must be signed in to change notification settings - Fork 158
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
Don't try to serialize the DynamicApi
property
#2578
Conversation
4490299
to
29f7464
Compare
@@ -39,17 +41,20 @@ public abstract class RealmCollectionBase<T> | |||
IThreadConfined, | |||
IMetadataObject | |||
{ | |||
private readonly List<NotificationCallbackDelegate<T>> _callbacks = new List<NotificationCallbackDelegate<T>>(); |
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.
Unfortunately, this change also reorders the members of RealmCollectionBase
because they were all over the place. Apart from the reordering, the only other change is the addition of the attributes.
public abstract class RealmObjectBase | ||
: INotifyPropertyChanged, | ||
IThreadConfined, | ||
INotifiable<NotifiableObjectHandleBase.CollectionChangeSet>, | ||
IReflectableType | ||
{ | ||
[NonSerialized, XmlIgnore] |
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.
The Xml serializer ignores the private/internal fields anyway.
Description
This replaces
[XmlIgnore]
with[IgnoreDataMember]
as that works for both the Xml and Json serializer. It removes[Serializable]
as that was only used in theBinarySerializer
which is very strongly obsoleted.Finally, it annotates the RealmCollectionBase properties with
[IgnoreDataMember]
to make sure a json serializer doesn't try to touch them and adds tests for both Xml and Json serialization.A couple of caveats:
Fixes #2579
TODO