|
@@ -8,7 +8,6 @@ using System.Linq;
|
|
|
using System.Linq.Expressions;
|
|
|
using System.Reflection;
|
|
|
using System.Runtime.CompilerServices;
|
|
|
-using System.Runtime.Serialization;
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
namespace InABox.Core
|
|
@@ -120,7 +119,7 @@ namespace InABox.Core
|
|
|
/// <summary>
|
|
|
/// Observable object with INotifyPropertyChanged implemented
|
|
|
/// </summary>
|
|
|
- public abstract class BaseObject : INotifyPropertyChanged, IBaseObject
|
|
|
+ public abstract class BaseObject : INotifyPropertyChanged, IBaseObject, IJsonOnDeserializing, IJsonOnDeserialized
|
|
|
{
|
|
|
public BaseObject()
|
|
|
{
|
|
@@ -171,15 +170,13 @@ namespace InABox.Core
|
|
|
field = newValue;
|
|
|
}
|
|
|
|
|
|
- [OnDeserializing]
|
|
|
- internal void OnDeserializingMethod(StreamingContext context)
|
|
|
+ public void OnDeserializing()
|
|
|
{
|
|
|
if (_observing)
|
|
|
SetObserving(false);
|
|
|
}
|
|
|
|
|
|
- [OnDeserialized]
|
|
|
- internal void OnDeserializedMethod(StreamingContext context)
|
|
|
+ public void OnDeserialized()
|
|
|
{
|
|
|
if (!_observing)
|
|
|
SetObserving(true);
|