-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMonoConstructArgs.cs
119 lines (98 loc) · 2.79 KB
/
MonoConstructArgs.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
namespace MonoConstruct
{
internal static class MonoConstructArgs<T1>
{
private static T1 _arg1;
internal static bool IsSet { get; private set; }
internal static void SetArgs(T1 arg1)
{
IsSet = true;
_arg1 = arg1;
}
internal static T1 GetArgs()
{
IsSet = false;
return _arg1;
}
}
internal static class MonoConstructArgs<T1, T2>
{
private static T1 _arg1;
private static T2 _arg2;
internal static bool IsSet { get; private set; }
internal static void SetArgs(T1 arg1, T2 arg2)
{
IsSet = true;
_arg1 = arg1;
_arg2 = arg2;
}
internal static (T1 arg1, T2 arg2) GetArgs()
{
IsSet = false;
return (_arg1, _arg2);
}
}
internal static class MonoConstructArgs<T1, T2, T3>
{
private static T1 _arg1;
private static T2 _arg2;
private static T3 _arg3;
internal static bool IsSet { get; private set; }
internal static void SetArgs(T1 arg1, T2 arg2, T3 arg3)
{
IsSet = true;
_arg1 = arg1;
_arg2 = arg2;
_arg3 = arg3;
}
internal static (T1 arg1, T2 arg2, T3 arg3) GetArgs()
{
IsSet = false;
return (_arg1, _arg2, _arg3);
}
}
internal static class MonoConstructArgs<T1, T2, T3, T4>
{
private static T1 _arg1;
private static T2 _arg2;
private static T3 _arg3;
private static T4 _arg4;
internal static bool IsSet { get; private set; }
internal static void SetArgs(T1 arg1, T2 arg2, T3 arg3, T4 arg4)
{
IsSet = true;
_arg1 = arg1;
_arg2 = arg2;
_arg3 = arg3;
_arg4 = arg4;
}
internal static (T1 arg1, T2 arg2, T3 arg3, T4 arg4) GetArgs()
{
IsSet = false;
return (_arg1, _arg2, _arg3, _arg4);
}
}
internal static class MonoConstructArgs<T1, T2, T3, T4, T5>
{
private static T1 _arg1;
private static T2 _arg2;
private static T3 _arg3;
private static T4 _arg4;
private static T5 _arg5;
internal static bool IsSet { get; private set; }
internal static void SetArgs(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
{
IsSet = true;
_arg1 = arg1;
_arg2 = arg2;
_arg3 = arg3;
_arg4 = arg4;
_arg5 = arg5;
}
internal static (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) GetArgs()
{
IsSet = false;
return (_arg1, _arg2, _arg3, _arg4, _arg5);
}
}
}