How to define custom collection with shared property member? Please kindly see attached, property "Data" cannot be serialization/deserialization.
Thanks a lot
B/r
Alex Luo
using MemoryPack;
using System.Collections;
namespace MemoryPackCollectionsTest
{
[MemoryPackable(GenerateType.Collection)]
public partial class MyDictionary : Dictionary<string, MyDictionary> where T : INodeData
{
region Properties
[MemoryPackOrder(0)]
public T? Data { get; set; }
#endregion
#region Constructor
[MemoryPackConstructor]
public MyDictionary()
{ }
public MyDictionary(T data)
{
Data = data;
}
#endregion
}
Hello,
How to define custom collection with shared property member? Please kindly see attached, property "Data" cannot be serialization/deserialization.
Thanks a lot B/r Alex Luo
using MemoryPack; using System.Collections;
namespace MemoryPackCollectionsTest { [MemoryPackable(GenerateType.Collection)] public partial class MyDictionary : Dictionary<string, MyDictionary> where T : INodeData
{
region Properties
}