forked from Cysharp/MemoryPack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModels.cs
78 lines (63 loc) · 1.5 KB
/
Models.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using MemoryPack;
using MemoryPack.Formatters;
using MemoryPack.Internal;
using Newtonsoft.Json.Linq;
using System;
using System.Buffers;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace SandboxConsoleApp;
[MemoryPackable]
public partial class Mop
{
public NoGen? MyProperty { get; set; }
public LisList? MyLisList { get; set; }
public List<Suage>? SuageMan { get; set; }
}
[MemoryPackable]
public partial class NotSample
{
[Utf8StringFormatter]
public string? Custom1 { get; set; }
}
[MemoryPackable(GenerateType.CircularReference)]
public partial class Node
{
[MemoryPackOrder(0)]
public Node? Parent { get; set; }
[MemoryPackOrder(1)]
public Node[]? Children { get; set; }
}
[MemoryPackable(GenerateType.VersionTolerant)]
public partial class TakoyakiY
{
[MemoryPackOrder(1)]
public string? Bar { get; set; }
[MemoryPackOrder(10)]
public int Foo { get; set; }
}
[MemoryPackable(GenerateType.CircularReference)]
public partial class Suage
{
[MemoryPackOrder(0)]
public int Prop1 { get; set; }
[MemoryPackOrder(2)]
public int Prop2 { get; set; }
//public Suage(int prop1, int prop2)
//{
// this.Prop1 = prop1;
// this.Prop2 = prop2;
//}
}
[MemoryPackable(GenerateType.NoGenerate)]
public partial class NoGen
{
}
[MemoryPackable(GenerateType.Collection)]
public partial class LisList : List<int>
{
}