START references + inheritance

This commit is contained in:
2020-09-18 01:06:21 +02:00
parent 47fba9e3da
commit 1c937abfe3
8 changed files with 255 additions and 41 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
using Newtonsoft.Json;
using System;
using zero.Core.Utils;
namespace zero.Core.Extensions
{
@@ -20,7 +21,7 @@ namespace zero.Core.Extensions
public static T Clone<T>(this T obj)
{
Type type = obj.GetType();
return (T)JsonConvert.DeserializeObject(JsonConvert.SerializeObject(obj), type);
return (T)JsonConvert.DeserializeObject(JsonConvert.SerializeObject(obj, new RefJsonConverter(), new RefsJsonConverter()), type, new RefJsonConverter(), new RefsJsonConverter());
}
}
}