-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathModel.cs
81 lines (68 loc) · 2.02 KB
/
Model.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
79
80
81
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StackOnlyJsonParser.UnitTests
{
[StackOnlyJsonType]
internal readonly ref partial struct StackOnlyType
{
public double Double { get; }
public int Int { get; }
public string String { get; }
public double Multiplied => Double * Int;
}
[StackOnlyJsonType]
internal readonly ref partial struct NullableStackOnlyType
{
public double? Double { get; }
public int? Int { get; }
}
[StackOnlyJsonType]
internal readonly ref partial struct StackOnlyTypeWithCustomNames
{
[StackOnlyJsonField("double-value", "double_value")]
public double Double { get; }
[StackOnlyJsonField("int-value")]
public int Int { get; }
[StackOnlyJsonField]
public string String { get; }
}
[StackOnlyJsonType]
internal readonly ref partial struct NestingStackOnlyType
{
public StackOnlyType Value1 { get; }
public StackOnlyType Value2 { get; }
}
[StackOnlyJsonType]
internal readonly ref partial struct EmptyStackOnlyType
{ }
[StackOnlyJsonArray(typeof(int))]
internal readonly ref partial struct StackOnlyIntArray
{ }
[StackOnlyJsonArray(typeof(int?))]
internal readonly ref partial struct StackOnlyNullableIntArray
{ }
[StackOnlyJsonArray(typeof(StackOnlyType))]
internal readonly ref partial struct StackOnlyTypeArray
{ }
[StackOnlyJsonDictionary(typeof(string), typeof(StackOnlyType))]
internal readonly ref partial struct StackOnlyDictionary
{ }
[StackOnlyJsonArray(typeof(StackOnlyTypeArray))]
internal readonly ref partial struct StackOnlyNestedArray
{ }
[StackOnlyJsonDictionary(typeof(StackOnlyJsonString), typeof(int))]
internal readonly ref partial struct StrictlyStackOnlyDictionary
{ }
[StackOnlyJsonType]
internal readonly ref partial struct RecursiveStackOnlyType
{
public int Id { get; }
public RecursiveStackOnlyLazyLoader Internal { get; }
}
[StackOnlyJsonLazyLoader(typeof(RecursiveStackOnlyType))]
internal readonly ref partial struct RecursiveStackOnlyLazyLoader
{ }
}