com.xmobitea.changx.gn-unity 2.0.3 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Editor/GNServerSettingsEditor.cs +16 -300
- package/Runtime/Common/GNArray.cs +387 -302
- package/Runtime/Common/GNArray.cs.meta +11 -11
- package/Runtime/Common/GNData.cs +61 -48
- package/Runtime/Common/GNData.cs.meta +11 -11
- package/Runtime/Common/GNHashtable.cs +404 -241
- package/Runtime/Common/GNHashtable.cs.meta +11 -11
- package/Runtime/Common/IGNData.cs +20 -11
- package/Runtime/Common/IGNData.cs.meta +11 -11
- package/Runtime/Common.meta +8 -8
- package/Runtime/Config/GNServerSettings.cs +136 -92
- package/Runtime/Config/GNServerSettings.cs.meta +11 -11
- package/Runtime/Config.meta +8 -8
- package/Runtime/Constant/Commands.cs +82 -19
- package/Runtime/Constant/Commands.cs.meta +11 -11
- package/Runtime/Constant/EnumType/FriendStatus.cs +12 -12
- package/Runtime/Constant/EnumType/FriendStatus.cs.meta +11 -11
- package/Runtime/Constant/EnumType/GoogleLoginType.cs +5 -5
- package/Runtime/Constant/EnumType/GoogleLoginType.cs.meta +11 -11
- package/Runtime/Constant/EnumType/GroupStatus.cs +7 -7
- package/Runtime/Constant/EnumType/GroupStatus.cs.meta +11 -11
- package/Runtime/Constant/EnumType/InvalidMemberType.cs +23 -23
- package/Runtime/Constant/EnumType/InvalidMemberType.cs.meta +11 -11
- package/Runtime/Constant/EnumType/ItemType.cs +5 -5
- package/Runtime/Constant/EnumType/ItemType.cs.meta +11 -11
- package/Runtime/Constant/EnumType/MatchmakingMemberStatus.cs +6 -6
- package/Runtime/Constant/EnumType/MatchmakingMemberStatus.cs.meta +11 -11
- package/Runtime/Constant/EnumType/MatchmakingTicketStatus.cs +2 -2
- package/Runtime/Constant/EnumType/MatchmakingTicketStatus.cs.meta +11 -11
- package/Runtime/Constant/EnumType/OwnerType.cs +3 -2
- package/Runtime/Constant/EnumType/OwnerType.cs.meta +11 -11
- package/Runtime/Constant/EnumType/PermissionDataItem.cs +10 -10
- package/Runtime/Constant/EnumType/PermissionDataItem.cs.meta +11 -11
- package/Runtime/Constant/EnumType/PushPlatformType.cs +10 -0
- package/Runtime/Constant/EnumType/PushPlatformType.cs.meta +11 -0
- package/Runtime/Constant/EnumType/RequestRole.cs +11 -11
- package/Runtime/Constant/EnumType/RequestRole.cs.meta +7 -7
- package/Runtime/Constant/EnumType/RequestType.cs +20 -19
- package/Runtime/Constant/EnumType/RequestType.cs.meta +11 -11
- package/Runtime/Constant/EnumType/StoreReceiveType.cs +13 -0
- package/Runtime/Constant/EnumType/StoreReceiveType.cs.meta +11 -0
- package/Runtime/Constant/EnumType.meta +8 -8
- package/Runtime/Constant/ErrorCode/GNErrorCode.cs +53 -48
- package/Runtime/Constant/ErrorCode/GNErrorCode.cs.meta +7 -7
- package/Runtime/Constant/ErrorCode.meta +8 -8
- package/Runtime/Constant/EventCode.cs +43 -16
- package/Runtime/Constant/EventCode.cs.meta +11 -11
- package/Runtime/Constant/OperationCode.cs +249 -211
- package/Runtime/Constant/OperationCode.cs.meta +11 -11
- package/Runtime/Constant/ParameterCode/GNParameterCode.cs +614 -466
- package/Runtime/Constant/ParameterCode/GNParameterCode.cs.meta +11 -11
- package/Runtime/Constant/ParameterCode/ParameterCode.cs +12 -12
- package/Runtime/Constant/ParameterCode/ParameterCode.cs.meta +11 -11
- package/Runtime/Constant/ParameterCode.meta +8 -8
- package/Runtime/Constant/ReturnCode.cs +73 -25
- package/Runtime/Constant/ReturnCode.cs.meta +11 -11
- package/Runtime/Constant.meta +8 -8
- package/Runtime/Entity/DataMember.cs +342 -124
- package/Runtime/Entity/DataMember.cs.meta +11 -11
- package/Runtime/Entity/GNMetadata.cs +72 -27
- package/Runtime/Entity/GNMetadata.cs.meta +11 -11
- package/Runtime/Entity/InvalidMember.cs +52 -33
- package/Runtime/Entity/InvalidMember.cs.meta +11 -11
- package/Runtime/Entity/Models/AuthenticateModels.cs +251 -207
- package/Runtime/Entity/Models/AuthenticateModels.cs.meta +11 -11
- package/Runtime/Entity/Models/AuthenticateRequestModels.cs +153 -131
- package/Runtime/Entity/Models/AuthenticateRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/AuthenticateResponseModels.cs +61 -51
- package/Runtime/Entity/Models/AuthenticateResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/CharacterPlayerModels.cs +985 -849
- package/Runtime/Entity/Models/CharacterPlayerModels.cs.meta +11 -11
- package/Runtime/Entity/Models/CharacterPlayerRequestModels.cs +957 -885
- package/Runtime/Entity/Models/CharacterPlayerRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/CharacterPlayerResponseModels.cs +165 -150
- package/Runtime/Entity/Models/CharacterPlayerResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/CloudScriptModels.cs +185 -0
- package/Runtime/Entity/Models/CloudScriptModels.cs.meta +11 -0
- package/Runtime/Entity/Models/CloudScriptRequestModels.cs +134 -0
- package/Runtime/Entity/Models/CloudScriptRequestModels.cs.meta +11 -0
- package/Runtime/Entity/Models/CloudScriptResponseModels.cs +34 -0
- package/Runtime/Entity/Models/CloudScriptResponseModels.cs.meta +11 -0
- package/Runtime/Entity/Models/ContentModels.cs +150 -153
- package/Runtime/Entity/Models/ContentModels.cs.meta +11 -11
- package/Runtime/Entity/Models/ContentRequestModels.cs +129 -129
- package/Runtime/Entity/Models/ContentRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/ContentResponseModels.cs +24 -24
- package/Runtime/Entity/Models/ContentResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/DashboardModels.cs +1684 -1156
- package/Runtime/Entity/Models/DashboardModels.cs.meta +11 -11
- package/Runtime/Entity/Models/DashboardRequestModels.cs +220 -147
- package/Runtime/Entity/Models/DashboardRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/DashboardResponseModels.cs +92 -57
- package/Runtime/Entity/Models/DashboardResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GamePlayerModels.cs +1073 -933
- package/Runtime/Entity/Models/GamePlayerModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GamePlayerRequestModels.cs +939 -867
- package/Runtime/Entity/Models/GamePlayerRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GamePlayerResponseModels.cs +162 -147
- package/Runtime/Entity/Models/GamePlayerResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GenericModels.cs +102 -102
- package/Runtime/Entity/Models/GenericModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GroupModels.cs +812 -676
- package/Runtime/Entity/Models/GroupModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GroupRequestModels.cs +741 -669
- package/Runtime/Entity/Models/GroupRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GroupResponseModels.cs +129 -114
- package/Runtime/Entity/Models/GroupResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/InventoryModels.cs +667 -558
- package/Runtime/Entity/Models/InventoryModels.cs.meta +11 -11
- package/Runtime/Entity/Models/InventoryRequestModels.cs +626 -579
- package/Runtime/Entity/Models/InventoryRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/InventoryResponseModels.cs +109 -99
- package/Runtime/Entity/Models/InventoryResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MasterPlayerModels.cs +1882 -1340
- package/Runtime/Entity/Models/MasterPlayerModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MasterPlayerRequestModels.cs +1643 -1253
- package/Runtime/Entity/Models/MasterPlayerRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MasterPlayerResponseModels.cs +293 -213
- package/Runtime/Entity/Models/MasterPlayerResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MultiplayerModels.cs +293 -223
- package/Runtime/Entity/Models/MultiplayerModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MultiplayerRequestModels.cs +199 -149
- package/Runtime/Entity/Models/MultiplayerRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MultiplayerResponseModels.cs +59 -49
- package/Runtime/Entity/Models/MultiplayerResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/StoreInventoryModels.cs +514 -323
- package/Runtime/Entity/Models/StoreInventoryModels.cs.meta +11 -11
- package/Runtime/Entity/Models/StoreInventoryRequestModels.cs +236 -165
- package/Runtime/Entity/Models/StoreInventoryRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/StoreInventoryResponseModels.cs +45 -30
- package/Runtime/Entity/Models/StoreInventoryResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models.meta +8 -8
- package/Runtime/Entity/OperationEvent.cs +111 -75
- package/Runtime/Entity/OperationEvent.cs.meta +11 -11
- package/Runtime/Entity/OperationHelper.cs +51 -35
- package/Runtime/Entity/OperationHelper.cs.meta +11 -11
- package/Runtime/Entity/OperationRequest.cs +142 -99
- package/Runtime/Entity/OperationRequest.cs.meta +11 -11
- package/Runtime/Entity/OperationResponse.cs +111 -63
- package/Runtime/Entity/OperationResponse.cs.meta +11 -11
- package/Runtime/Entity/Request/CustomOperationRequest.cs +112 -61
- package/Runtime/Entity/Request/CustomOperationRequest.cs.meta +11 -11
- package/Runtime/Entity/Request.meta +8 -8
- package/Runtime/Entity/Response/CustomOperationResponse.cs +84 -63
- package/Runtime/Entity/Response/CustomOperationResponse.cs.meta +11 -11
- package/Runtime/Entity/Response.meta +8 -8
- package/Runtime/Entity.meta +8 -8
- package/Runtime/GNNetwork.cs +501 -182
- package/Runtime/GNNetwork.cs.meta +11 -11
- package/Runtime/GNNetworkApi.cs +38 -19
- package/Runtime/GNNetworkApi.cs.meta +11 -11
- package/Runtime/GNNetworkAuthenticateApi.cs +531 -98
- package/Runtime/GNNetworkAuthenticateApi.cs.meta +11 -11
- package/Runtime/GNNetworkCharacterPlayerApi.cs +1587 -762
- package/Runtime/GNNetworkCharacterPlayerApi.cs.meta +11 -11
- package/Runtime/GNNetworkCloudScriptApi.cs +181 -0
- package/Runtime/GNNetworkCloudScriptApi.cs.meta +11 -0
- package/Runtime/GNNetworkContentApi.cs +238 -132
- package/Runtime/GNNetworkContentApi.cs.meta +11 -11
- package/Runtime/GNNetworkDashboardApi.cs +278 -117
- package/Runtime/GNNetworkDashboardApi.cs.meta +11 -11
- package/Runtime/GNNetworkGamePlayerApi.cs +1558 -747
- package/Runtime/GNNetworkGamePlayerApi.cs.meta +11 -11
- package/Runtime/GNNetworkGroupApi.cs +1228 -582
- package/Runtime/GNNetworkGroupApi.cs.meta +11 -11
- package/Runtime/GNNetworkInventoryApi.cs +1048 -507
- package/Runtime/GNNetworkInventoryApi.cs.meta +11 -11
- package/Runtime/GNNetworkMasterPlayerApi.cs +2586 -1067
- package/Runtime/GNNetworkMasterPlayerApi.cs.meta +11 -11
- package/Runtime/GNNetworkMultiplayerApi.cs +328 -147
- package/Runtime/GNNetworkMultiplayerApi.cs.meta +11 -11
- package/Runtime/GNNetworkStoreInventoryApi.cs +388 -162
- package/Runtime/GNNetworkStoreInventoryApi.cs.meta +11 -11
- package/Runtime/Helper/CodeHelper.cs +140 -98
- package/Runtime/Helper/CodeHelper.cs.meta +11 -11
- package/Runtime/Helper/ConverterService.cs +236 -52
- package/Runtime/Helper/ConverterService.cs.meta +11 -11
- package/Runtime/Helper/ParseGNHelper.cs +451 -451
- package/Runtime/Helper/ParseGNHelper.cs.meta +11 -11
- package/Runtime/Helper.meta +8 -8
- package/Runtime/Logger/GNDebug.cs +92 -49
- package/Runtime/Logger/GNDebug.cs.meta +11 -11
- package/Runtime/Logger.meta +8 -8
- package/Runtime/Networking/AuthenticateStatus.cs +57 -35
- package/Runtime/Networking/AuthenticateStatus.cs.meta +11 -11
- package/Runtime/Networking/Handler/IServerEventHandler.cs +25 -25
- package/Runtime/Networking/Handler/IServerEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnCharacterPlayerFriendUpdateEventHandler.cs +61 -32
- package/Runtime/Networking/Handler/OnCharacterPlayerFriendUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnCharacterPlayerGroupUpdateEventHandler.cs +54 -33
- package/Runtime/Networking/Handler/OnCharacterPlayerGroupUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnGamePlayerFriendUpdateEventHandler.cs +54 -32
- package/Runtime/Networking/Handler/OnGamePlayerFriendUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnGamePlayerGroupUpdateEventHandler.cs +54 -32
- package/Runtime/Networking/Handler/OnGamePlayerGroupUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnGroupMemberUpdateEventHandler.cs +48 -29
- package/Runtime/Networking/Handler/OnGroupMemberUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnGroupMessageUpdateEventHandler.cs +47 -29
- package/Runtime/Networking/Handler/OnGroupMessageUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler.meta +8 -8
- package/Runtime/Networking/Http/HttpPeer.cs +68 -25
- package/Runtime/Networking/Http/HttpPeer.cs.meta +11 -11
- package/Runtime/Networking/Http/NetworkingHttpPeerBase.cs +65 -25
- package/Runtime/Networking/Http/NetworkingHttpPeerBase.cs.meta +11 -11
- package/Runtime/Networking/Http/NetworkingPeerHttpClientRequest.cs +513 -486
- package/Runtime/Networking/Http/NetworkingPeerHttpClientRequest.cs.meta +11 -11
- package/Runtime/Networking/Http/NetworkingPeerHttpRequest.cs +172 -142
- package/Runtime/Networking/Http/NetworkingPeerHttpRequest.cs.meta +11 -11
- package/Runtime/Networking/Http/NetworkingPeerUnityWebRequest.cs +225 -188
- package/Runtime/Networking/Http/NetworkingPeerUnityWebRequest.cs.meta +11 -11
- package/Runtime/Networking/Http.meta +8 -8
- package/Runtime/Networking/IPeer.cs +41 -19
- package/Runtime/Networking/IPeer.cs.meta +11 -11
- package/Runtime/Networking/NetworkingPeer.cs +198 -144
- package/Runtime/Networking/NetworkingPeer.cs.meta +11 -11
- package/Runtime/Networking/NetworkingPeerAPI.cs +20 -21
- package/Runtime/Networking/NetworkingPeerAPI.cs.meta +11 -11
- package/Runtime/Networking/OperationPending.cs +159 -95
- package/Runtime/Networking/OperationPending.cs.meta +11 -11
- package/Runtime/Networking/PeerBase.cs +305 -242
- package/Runtime/Networking/PeerBase.cs.meta +11 -11
- package/Runtime/Networking/Socket/NetworkingPeerSocketV2.cs +222 -185
- package/Runtime/Networking/Socket/NetworkingPeerSocketV2.cs.meta +11 -11
- package/Runtime/Networking/Socket/NetworkingPeerSocketV3.cs +235 -177
- package/Runtime/Networking/Socket/NetworkingPeerSocketV3.cs.meta +11 -11
- package/Runtime/Networking/Socket/NetworkingSocketPeerBase.cs +165 -23
- package/Runtime/Networking/Socket/NetworkingSocketPeerBase.cs.meta +11 -11
- package/Runtime/Networking/Socket/SocketPeer.cs +242 -197
- package/Runtime/Networking/Socket/SocketPeer.cs.meta +11 -11
- package/Runtime/Networking/Socket.meta +8 -8
- package/Runtime/Networking.meta +8 -8
- package/Runtime/Unity/ServiceCoroutine.cs +10 -0
- package/Runtime/Unity/ServiceCoroutine.cs.meta +11 -0
- package/Runtime/Unity/ServiceUpdate.cs +33 -20
- package/Runtime/Unity/ServiceUpdate.cs.meta +11 -11
- package/Runtime/Unity.meta +8 -8
- package/Runtime/XmobiTea.GN.runtime.asmdef +16 -16
- package/Runtime/XmobiTea.GN.runtime.asmdef.meta +7 -7
- package/package.json +1 -1
|
@@ -1,124 +1,342 @@
|
|
|
1
|
-
using System;
|
|
2
|
-
using System.Reflection;
|
|
3
|
-
using XmobiTea.GN.Common;
|
|
4
|
-
|
|
5
|
-
namespace XmobiTea.GN.Entity
|
|
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
|
-
public
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
public
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
public
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
public
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
public
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
public
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
1
|
+
using System;
|
|
2
|
+
using System.Reflection;
|
|
3
|
+
using XmobiTea.GN.Common;
|
|
4
|
+
|
|
5
|
+
namespace XmobiTea.GN.Entity
|
|
6
|
+
{
|
|
7
|
+
/// <summary>
|
|
8
|
+
/// Enhanced metadata for an object field in the GN system.
|
|
9
|
+
/// </summary>
|
|
10
|
+
public interface IGNEnhancedObjectFieldMetadata : GNObjectFieldMetadata
|
|
11
|
+
{
|
|
12
|
+
/// <summary>
|
|
13
|
+
/// Gets or sets the code associated with the field.
|
|
14
|
+
/// </summary>
|
|
15
|
+
string code { get; set; }
|
|
16
|
+
|
|
17
|
+
/// <summary>
|
|
18
|
+
/// Gets or sets whether the field is optional.
|
|
19
|
+
/// </summary>
|
|
20
|
+
bool isOptional { get; set; }
|
|
21
|
+
|
|
22
|
+
/// <summary>
|
|
23
|
+
/// Gets or sets the data type of the field.
|
|
24
|
+
/// </summary>
|
|
25
|
+
GNFieldDataType gnFieldType { get; set; }
|
|
26
|
+
|
|
27
|
+
/// <summary>
|
|
28
|
+
/// Gets or sets the default value of the field.
|
|
29
|
+
/// </summary>
|
|
30
|
+
object defaultValue { get; set; }
|
|
31
|
+
|
|
32
|
+
/// <summary>
|
|
33
|
+
/// Gets or sets whether the active condition validation is valid.
|
|
34
|
+
/// </summary>
|
|
35
|
+
bool activeConditionValid { get; set; }
|
|
36
|
+
|
|
37
|
+
/// <summary>
|
|
38
|
+
/// Gets or sets whether the field must be non-null.
|
|
39
|
+
/// </summary>
|
|
40
|
+
bool? mustNonNull { get; set; }
|
|
41
|
+
|
|
42
|
+
/// <summary>
|
|
43
|
+
/// Gets or sets the minimum length for the field's value, if applicable.
|
|
44
|
+
/// </summary>
|
|
45
|
+
int? minLength { get; set; }
|
|
46
|
+
|
|
47
|
+
/// <summary>
|
|
48
|
+
/// Gets or sets the maximum length for the field's value, if applicable.
|
|
49
|
+
/// </summary>
|
|
50
|
+
int? maxLength { get; set; }
|
|
51
|
+
|
|
52
|
+
/// <summary>
|
|
53
|
+
/// Gets or sets the minimum value for the field, if applicable.
|
|
54
|
+
/// </summary>
|
|
55
|
+
double? minValue { get; set; }
|
|
56
|
+
|
|
57
|
+
/// <summary>
|
|
58
|
+
/// Gets or sets the maximum value for the field, if applicable.
|
|
59
|
+
/// </summary>
|
|
60
|
+
double? maxValue { get; set; }
|
|
61
|
+
|
|
62
|
+
/// <summary>
|
|
63
|
+
/// Gets or sets whether the field's value must be an integer.
|
|
64
|
+
/// </summary>
|
|
65
|
+
bool? mustInt { get; set; }
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/// <summary>
|
|
69
|
+
/// Implementation of the enhanced metadata for an object field in the GN system.
|
|
70
|
+
/// </summary>
|
|
71
|
+
public class GNEnhancedObjectFieldMetadata : IGNEnhancedObjectFieldMetadata
|
|
72
|
+
{
|
|
73
|
+
/// <inheritdoc/>
|
|
74
|
+
public string code { get; set; }
|
|
75
|
+
|
|
76
|
+
/// <inheritdoc/>
|
|
77
|
+
public bool isOptional { get; set; }
|
|
78
|
+
|
|
79
|
+
/// <inheritdoc/>
|
|
80
|
+
public GNFieldDataType gnFieldType { get; set; }
|
|
81
|
+
|
|
82
|
+
/// <inheritdoc/>
|
|
83
|
+
public object defaultValue { get; set; }
|
|
84
|
+
|
|
85
|
+
/// <inheritdoc/>
|
|
86
|
+
public bool activeConditionValid { get; set; }
|
|
87
|
+
|
|
88
|
+
/// <inheritdoc/>
|
|
89
|
+
public bool? mustNonNull { get; set; }
|
|
90
|
+
|
|
91
|
+
/// <inheritdoc/>
|
|
92
|
+
public int? minLength { get; set; }
|
|
93
|
+
|
|
94
|
+
/// <inheritdoc/>
|
|
95
|
+
public int? maxLength { get; set; }
|
|
96
|
+
|
|
97
|
+
/// <inheritdoc/>
|
|
98
|
+
public double? minValue { get; set; }
|
|
99
|
+
|
|
100
|
+
/// <inheritdoc/>
|
|
101
|
+
public double? maxValue { get; set; }
|
|
102
|
+
|
|
103
|
+
/// <inheritdoc/>
|
|
104
|
+
public bool? mustInt { get; set; }
|
|
105
|
+
|
|
106
|
+
/// <inheritdoc/>
|
|
107
|
+
public string name { get; }
|
|
108
|
+
|
|
109
|
+
/// <inheritdoc/>
|
|
110
|
+
public FieldDataType fieldType { get; }
|
|
111
|
+
|
|
112
|
+
/// <inheritdoc/>
|
|
113
|
+
public Type cls { get; }
|
|
114
|
+
|
|
115
|
+
/// <inheritdoc/>
|
|
116
|
+
public FieldInfo fieldInfo { get; }
|
|
117
|
+
|
|
118
|
+
/// <summary>
|
|
119
|
+
/// Initializes a new instance of the <see cref="GNEnhancedObjectFieldMetadata"/> class.
|
|
120
|
+
/// </summary>
|
|
121
|
+
/// <param name="name">The name of the field.</param>
|
|
122
|
+
/// <param name="fieldType">The type of data stored in the field.</param>
|
|
123
|
+
/// <param name="cls">The class type associated with the field.</param>
|
|
124
|
+
/// <param name="fieldInfo">The reflection field information for the field.</param>
|
|
125
|
+
public GNEnhancedObjectFieldMetadata(string name, FieldDataType fieldType, Type cls, FieldInfo fieldInfo)
|
|
126
|
+
{
|
|
127
|
+
this.name = name;
|
|
128
|
+
this.fieldType = fieldType;
|
|
129
|
+
this.cls = cls;
|
|
130
|
+
this.fieldInfo = fieldInfo;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/// <summary>
|
|
135
|
+
/// Enumeration of GN field data types.
|
|
136
|
+
/// </summary>
|
|
137
|
+
public enum GNFieldDataType
|
|
138
|
+
{
|
|
139
|
+
/// <summary>
|
|
140
|
+
/// Represents an undefined or other data type.
|
|
141
|
+
/// </summary>
|
|
142
|
+
Other = 0,
|
|
143
|
+
|
|
144
|
+
/// <summary>
|
|
145
|
+
/// Represents numeric data types (e.g., int, float, double).
|
|
146
|
+
/// </summary>
|
|
147
|
+
Number = 1,
|
|
148
|
+
|
|
149
|
+
/// <summary>
|
|
150
|
+
/// Represents string data types.
|
|
151
|
+
/// </summary>
|
|
152
|
+
String = 2,
|
|
153
|
+
|
|
154
|
+
/// <summary>
|
|
155
|
+
/// Represents boolean data types.
|
|
156
|
+
/// </summary>
|
|
157
|
+
Boolean = 3,
|
|
158
|
+
|
|
159
|
+
/// <summary>
|
|
160
|
+
/// Represents GNHashtable data types.
|
|
161
|
+
/// </summary>
|
|
162
|
+
GNHashtable = 4,
|
|
163
|
+
|
|
164
|
+
/// <summary>
|
|
165
|
+
/// Represents GNArray data types.
|
|
166
|
+
/// </summary>
|
|
167
|
+
GNArray = 5,
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/// <summary>
|
|
171
|
+
/// Base attribute for data member fields with optional metadata.
|
|
172
|
+
/// </summary>
|
|
173
|
+
[AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
|
|
174
|
+
public class DataMemberAttribute : Attribute
|
|
175
|
+
{
|
|
176
|
+
/// <summary>
|
|
177
|
+
/// Gets the field data type, defaults to Other.
|
|
178
|
+
/// </summary>
|
|
179
|
+
public virtual GNFieldDataType gnFieldType => GNFieldDataType.Other;
|
|
180
|
+
|
|
181
|
+
/// <summary>
|
|
182
|
+
/// Gets or sets the code associated with the field.
|
|
183
|
+
/// </summary>
|
|
184
|
+
public string code { get; set; }
|
|
185
|
+
|
|
186
|
+
/// <summary>
|
|
187
|
+
/// Gets or sets whether the field is optional. Default is false.
|
|
188
|
+
/// </summary>
|
|
189
|
+
public bool isOptional { get; set; } = false;
|
|
190
|
+
|
|
191
|
+
/// <summary>
|
|
192
|
+
/// Gets or sets the default value for the field.
|
|
193
|
+
/// </summary>
|
|
194
|
+
public object defaultValue { get; set; } = null;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/// <summary>
|
|
198
|
+
/// Attribute for string data member fields with additional constraints.
|
|
199
|
+
/// </summary>
|
|
200
|
+
public class StringDataMemberAttribute : DataMemberAttribute
|
|
201
|
+
{
|
|
202
|
+
/// <summary>
|
|
203
|
+
/// Overrides the field data type to String.
|
|
204
|
+
/// </summary>
|
|
205
|
+
public override GNFieldDataType gnFieldType => GNFieldDataType.String;
|
|
206
|
+
|
|
207
|
+
/// <summary>
|
|
208
|
+
/// Gets or sets the default value for the string field.
|
|
209
|
+
/// </summary>
|
|
210
|
+
public new string defaultValue { get; set; }
|
|
211
|
+
|
|
212
|
+
/// <summary>
|
|
213
|
+
/// Gets or sets whether the string must be non-null. Default is false.
|
|
214
|
+
/// </summary>
|
|
215
|
+
public bool mustNonNull { get; set; } = false;
|
|
216
|
+
|
|
217
|
+
/// <summary>
|
|
218
|
+
/// Gets or sets the minimum length for the string. Default is -1 (no constraint).
|
|
219
|
+
/// </summary>
|
|
220
|
+
public int minLength { get; set; } = -1;
|
|
221
|
+
|
|
222
|
+
/// <summary>
|
|
223
|
+
/// Gets or sets the maximum length for the string. Default is -1 (no constraint).
|
|
224
|
+
/// </summary>
|
|
225
|
+
public int maxLength { get; set; } = -1;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/// <summary>
|
|
229
|
+
/// Attribute for boolean data member fields with additional constraints.
|
|
230
|
+
/// </summary>
|
|
231
|
+
public class BooleanDataMemberAttribute : DataMemberAttribute
|
|
232
|
+
{
|
|
233
|
+
/// <summary>
|
|
234
|
+
/// Overrides the field data type to Boolean.
|
|
235
|
+
/// </summary>
|
|
236
|
+
public override GNFieldDataType gnFieldType => GNFieldDataType.Boolean;
|
|
237
|
+
|
|
238
|
+
/// <summary>
|
|
239
|
+
/// Gets or sets the default value for the boolean field. Default is false.
|
|
240
|
+
/// </summary>
|
|
241
|
+
public new bool defaultValue { get; set; } = false;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/// <summary>
|
|
245
|
+
/// Attribute for GNHashtable data member fields with additional constraints.
|
|
246
|
+
/// </summary>
|
|
247
|
+
public class GNHashtableDataMemberAttribute : DataMemberAttribute
|
|
248
|
+
{
|
|
249
|
+
/// <summary>
|
|
250
|
+
/// Overrides the field data type to GNHashtable.
|
|
251
|
+
/// </summary>
|
|
252
|
+
public override GNFieldDataType gnFieldType => GNFieldDataType.GNHashtable;
|
|
253
|
+
|
|
254
|
+
/// <summary>
|
|
255
|
+
/// Gets or sets the default value for the GNHashtable field.
|
|
256
|
+
/// </summary>
|
|
257
|
+
public new GNHashtable defaultValue { get; set; } = null;
|
|
258
|
+
|
|
259
|
+
/// <summary>
|
|
260
|
+
/// Gets or sets whether the GNHashtable must be non-null. Default is false.
|
|
261
|
+
/// </summary>
|
|
262
|
+
public bool mustNonNull { get; set; } = false;
|
|
263
|
+
|
|
264
|
+
/// <summary>
|
|
265
|
+
/// Gets or sets the minimum length for the GNHashtable. Default is -1 (no constraint).
|
|
266
|
+
/// </summary>
|
|
267
|
+
public int minLength { get; set; } = -1;
|
|
268
|
+
|
|
269
|
+
/// <summary>
|
|
270
|
+
/// Gets or sets the maximum length for the GNHashtable. Default is -1 (no constraint).
|
|
271
|
+
/// </summary>
|
|
272
|
+
public int maxLength { get; set; } = -1;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/// <summary>
|
|
276
|
+
/// Attribute for GNArray data member fields with additional constraints.
|
|
277
|
+
/// </summary>
|
|
278
|
+
public class GNArrayDataMemberAttribute : DataMemberAttribute
|
|
279
|
+
{
|
|
280
|
+
/// <summary>
|
|
281
|
+
/// Overrides the field data type to GNArray.
|
|
282
|
+
/// </summary>
|
|
283
|
+
public override GNFieldDataType gnFieldType => GNFieldDataType.GNArray;
|
|
284
|
+
|
|
285
|
+
/// <summary>
|
|
286
|
+
/// Gets or sets the default value for the GNArray field.
|
|
287
|
+
/// </summary>
|
|
288
|
+
public new GNArray defaultValue { get; set; } = null;
|
|
289
|
+
|
|
290
|
+
/// <summary>
|
|
291
|
+
/// Gets or sets whether the GNArray must be non-null. Default is false.
|
|
292
|
+
/// </summary>
|
|
293
|
+
public bool mustNonNull { get; set; } = false;
|
|
294
|
+
|
|
295
|
+
/// <summary>
|
|
296
|
+
/// Gets or sets the minimum length for the GNArray. Default is -1 (no constraint).
|
|
297
|
+
/// </summary>
|
|
298
|
+
public int minLength { get; set; } = -1;
|
|
299
|
+
|
|
300
|
+
/// <summary>
|
|
301
|
+
/// Gets or sets the maximum length for the GNArray. Default is -1 (no constraint).
|
|
302
|
+
/// </summary>
|
|
303
|
+
public int maxLength { get; set; } = -1;
|
|
304
|
+
|
|
305
|
+
/// <summary>
|
|
306
|
+
/// Gets or sets the type of elements in the GNArray.
|
|
307
|
+
/// </summary>
|
|
308
|
+
public Type elementCls { get; set; } = null;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/// <summary>
|
|
312
|
+
/// Attribute for numeric data member fields with additional constraints.
|
|
313
|
+
/// </summary>
|
|
314
|
+
public class NumberDataMemberAttribute : DataMemberAttribute
|
|
315
|
+
{
|
|
316
|
+
/// <summary>
|
|
317
|
+
/// Overrides the field data type to Number.
|
|
318
|
+
/// </summary>
|
|
319
|
+
public override GNFieldDataType gnFieldType => GNFieldDataType.Number;
|
|
320
|
+
|
|
321
|
+
/// <summary>
|
|
322
|
+
/// Gets or sets the default value for the numeric field.
|
|
323
|
+
/// </summary>
|
|
324
|
+
public new double defaultValue { get; set; }
|
|
325
|
+
|
|
326
|
+
/// <summary>
|
|
327
|
+
/// Gets or sets the minimum value for the numeric field. Default is -1 (no constraint).
|
|
328
|
+
/// </summary>
|
|
329
|
+
public double minValue { get; set; } = -1;
|
|
330
|
+
|
|
331
|
+
/// <summary>
|
|
332
|
+
/// Gets or sets the maximum value for the numeric field. Default is -1 (no constraint).
|
|
333
|
+
/// </summary>
|
|
334
|
+
public double maxValue { get; set; } = -1;
|
|
335
|
+
|
|
336
|
+
/// <summary>
|
|
337
|
+
/// Gets or sets whether the numeric field must be an integer. Default is false.
|
|
338
|
+
/// </summary>
|
|
339
|
+
public bool mustInt { get; set; } = false;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 2fb46eda6cad8b34baca26e5a0fc682f
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 2fb46eda6cad8b34baca26e5a0fc682f
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,27 +1,72 @@
|
|
|
1
|
-
namespace XmobiTea.GN.Entity
|
|
2
|
-
{
|
|
3
|
-
using System;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
namespace XmobiTea.GN.Entity
|
|
2
|
+
{
|
|
3
|
+
using System;
|
|
4
|
+
|
|
5
|
+
/// <summary>
|
|
6
|
+
/// Enum representing the various data types for object fields.
|
|
7
|
+
/// </summary>
|
|
8
|
+
public enum FieldDataType
|
|
9
|
+
{
|
|
10
|
+
/// <summary>
|
|
11
|
+
/// Boolean data type.
|
|
12
|
+
/// </summary>
|
|
13
|
+
Boolean = 0,
|
|
14
|
+
|
|
15
|
+
/// <summary>
|
|
16
|
+
/// Numeric data type.
|
|
17
|
+
/// </summary>
|
|
18
|
+
Number = 1,
|
|
19
|
+
|
|
20
|
+
/// <summary>
|
|
21
|
+
/// String data type.
|
|
22
|
+
/// </summary>
|
|
23
|
+
String = 2,
|
|
24
|
+
|
|
25
|
+
/// <summary>
|
|
26
|
+
/// Array data type.
|
|
27
|
+
/// </summary>
|
|
28
|
+
Array = 3,
|
|
29
|
+
|
|
30
|
+
/// <summary>
|
|
31
|
+
/// Object data type.
|
|
32
|
+
/// </summary>
|
|
33
|
+
Object = 4,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/// <summary>
|
|
37
|
+
/// Metadata describing a field in a GN object.
|
|
38
|
+
/// </summary>
|
|
39
|
+
public interface GNObjectFieldMetadata
|
|
40
|
+
{
|
|
41
|
+
/// <summary>
|
|
42
|
+
/// Gets the name of the field.
|
|
43
|
+
/// </summary>
|
|
44
|
+
string name { get; }
|
|
45
|
+
|
|
46
|
+
/// <summary>
|
|
47
|
+
/// Gets the type of the field.
|
|
48
|
+
/// </summary>
|
|
49
|
+
FieldDataType fieldType { get; }
|
|
50
|
+
|
|
51
|
+
/// <summary>
|
|
52
|
+
/// Gets the class type of the field, if applicable.
|
|
53
|
+
/// </summary>
|
|
54
|
+
Type cls { get; }
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/// <summary>
|
|
58
|
+
/// Metadata describing a GN object.
|
|
59
|
+
/// </summary>
|
|
60
|
+
public interface GNObjectMetadata
|
|
61
|
+
{
|
|
62
|
+
/// <summary>
|
|
63
|
+
/// Gets the unique identifier for the GN object.
|
|
64
|
+
/// </summary>
|
|
65
|
+
string id { get; }
|
|
66
|
+
|
|
67
|
+
/// <summary>
|
|
68
|
+
/// Gets an array of field metadata for the GN object.
|
|
69
|
+
/// </summary>
|
|
70
|
+
GNObjectFieldMetadata[] fields { get; }
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: efcab10bf6c0a39469ab2352f22cff05
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: efcab10bf6c0a39469ab2352f22cff05
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|