com.xmobitea.changx.gn-unity 2.0.2 → 2.0.3
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 +27 -23
- package/Runtime/Common/GNArray.cs +302 -302
- package/Runtime/Common/GNArray.cs.meta +11 -11
- package/Runtime/Common/GNData.cs +48 -48
- package/Runtime/Common/GNData.cs.meta +11 -11
- package/Runtime/Common/GNHashtable.cs +241 -241
- package/Runtime/Common/GNHashtable.cs.meta +11 -11
- package/Runtime/Common/IGNData.cs +11 -11
- package/Runtime/Common/IGNData.cs.meta +11 -11
- package/Runtime/Common.meta +8 -8
- package/Runtime/Config/GNServerSettings.cs.meta +11 -11
- package/Runtime/Config.meta +8 -8
- 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.meta +11 -11
- 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.meta +11 -11
- package/Runtime/Constant/EnumType/MatchmakingMemberStatus.cs.meta +11 -11
- package/Runtime/Constant/EnumType/MatchmakingTicketStatus.cs.meta +11 -11
- 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/RequestRole.cs +11 -11
- package/Runtime/Constant/EnumType/RequestRole.cs.meta +7 -7
- package/Runtime/Constant/EnumType/RequestType.cs +19 -19
- package/Runtime/Constant/EnumType/RequestType.cs.meta +11 -11
- package/Runtime/Constant/EnumType.meta +8 -8
- package/Runtime/Constant/ErrorCode/GNErrorCode.cs.meta +7 -7
- package/Runtime/Constant/ErrorCode.meta +8 -8
- package/Runtime/Constant/EventCode.cs +16 -16
- package/Runtime/Constant/EventCode.cs.meta +11 -11
- package/Runtime/Constant/OperationCode.cs.meta +11 -11
- 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 +25 -25
- package/Runtime/Constant/ReturnCode.cs.meta +11 -11
- package/Runtime/Constant.meta +8 -8
- package/Runtime/Entity/DataMember.cs +124 -124
- package/Runtime/Entity/DataMember.cs.meta +11 -11
- package/Runtime/Entity/GNMetadata.cs +27 -27
- package/Runtime/Entity/GNMetadata.cs.meta +11 -11
- package/Runtime/Entity/InvalidMember.cs +33 -33
- package/Runtime/Entity/InvalidMember.cs.meta +11 -11
- package/Runtime/Entity/Models/AuthenticateModels.cs.meta +11 -11
- package/Runtime/Entity/Models/AuthenticateRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/AuthenticateResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/CharacterPlayerModels.cs.meta +11 -11
- package/Runtime/Entity/Models/CharacterPlayerRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/CharacterPlayerResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/ContentModels.cs.meta +11 -11
- package/Runtime/Entity/Models/ContentRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/ContentResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/DashboardModels.cs.meta +11 -11
- package/Runtime/Entity/Models/DashboardRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/DashboardResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GamePlayerModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GamePlayerRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GamePlayerResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GenericModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GroupModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GroupRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GroupResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/InventoryModels.cs.meta +11 -11
- package/Runtime/Entity/Models/InventoryRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/InventoryResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MasterPlayerModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MasterPlayerRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MasterPlayerResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MultiplayerModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MultiplayerRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MultiplayerResponseModels.cs +49 -49
- package/Runtime/Entity/Models/MultiplayerResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/StoreInventoryModels.cs.meta +11 -11
- package/Runtime/Entity/Models/StoreInventoryRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/StoreInventoryResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models.meta +8 -8
- package/Runtime/Entity/OperationEvent.cs +75 -75
- package/Runtime/Entity/OperationEvent.cs.meta +11 -11
- package/Runtime/Entity/OperationHelper.cs +35 -35
- package/Runtime/Entity/OperationHelper.cs.meta +11 -11
- package/Runtime/Entity/OperationRequest.cs +99 -99
- package/Runtime/Entity/OperationRequest.cs.meta +11 -11
- package/Runtime/Entity/OperationResponse.cs.meta +11 -11
- package/Runtime/Entity/Request/CustomOperationRequest.cs +61 -61
- package/Runtime/Entity/Request/CustomOperationRequest.cs.meta +11 -11
- package/Runtime/Entity/Request.meta +8 -8
- package/Runtime/Entity/Response/CustomOperationResponse.cs +63 -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 +182 -184
- package/Runtime/GNNetwork.cs.meta +11 -11
- package/Runtime/GNNetworkApi.cs +19 -26
- package/Runtime/GNNetworkApi.cs.meta +11 -11
- package/Runtime/GNNetworkAuthenticateApi.cs.meta +11 -11
- package/Runtime/GNNetworkCharacterPlayerApi.cs.meta +11 -11
- package/Runtime/GNNetworkContentApi.cs.meta +11 -11
- package/Runtime/GNNetworkDashboardApi.cs.meta +11 -11
- package/Runtime/GNNetworkGamePlayerApi.cs.meta +11 -11
- package/Runtime/GNNetworkGroupApi.cs.meta +11 -11
- package/Runtime/GNNetworkInventoryApi.cs.meta +11 -11
- package/Runtime/GNNetworkMasterPlayerApi.cs.meta +11 -11
- package/Runtime/GNNetworkMultiplayerApi.cs.meta +11 -11
- package/Runtime/GNNetworkStoreInventoryApi.cs.meta +11 -11
- package/Runtime/Helper/CodeHelper.cs +97 -97
- package/Runtime/Helper/CodeHelper.cs.meta +11 -11
- package/Runtime/Helper/ConverterService.cs +12 -41
- 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 +49 -49
- package/Runtime/Logger/GNDebug.cs.meta +11 -11
- package/Runtime/Logger.meta +8 -8
- package/Runtime/Networking/AuthenticateStatus.cs +35 -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 +32 -32
- package/Runtime/Networking/Handler/OnCharacterPlayerFriendUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnCharacterPlayerGroupUpdateEventHandler.cs +33 -33
- package/Runtime/Networking/Handler/OnCharacterPlayerGroupUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnGamePlayerFriendUpdateEventHandler.cs +32 -32
- package/Runtime/Networking/Handler/OnGamePlayerFriendUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnGamePlayerGroupUpdateEventHandler.cs +32 -32
- package/Runtime/Networking/Handler/OnGamePlayerGroupUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnGroupMemberUpdateEventHandler.cs +29 -29
- package/Runtime/Networking/Handler/OnGroupMemberUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnGroupMessageUpdateEventHandler.cs +29 -29
- package/Runtime/Networking/Handler/OnGroupMessageUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler.meta +8 -8
- package/Runtime/Networking/Http/HttpPeer.cs.meta +11 -11
- package/Runtime/Networking/Http/NetworkingHttpPeerBase.cs +25 -25
- package/Runtime/Networking/Http/NetworkingHttpPeerBase.cs.meta +11 -11
- package/Runtime/Networking/Http/NetworkingPeerHttpClientRequest.cs +486 -490
- package/Runtime/Networking/Http/NetworkingPeerHttpClientRequest.cs.meta +11 -11
- package/Runtime/Networking/Http/NetworkingPeerHttpRequest.cs +142 -142
- package/Runtime/Networking/Http/NetworkingPeerHttpRequest.cs.meta +11 -11
- package/Runtime/Networking/Http/NetworkingPeerUnityWebRequest.cs +188 -192
- package/Runtime/Networking/Http/NetworkingPeerUnityWebRequest.cs.meta +11 -11
- package/Runtime/Networking/Http.meta +8 -8
- package/Runtime/Networking/IPeer.cs +19 -19
- package/Runtime/Networking/IPeer.cs.meta +11 -11
- package/Runtime/Networking/NetworkingPeer.cs +144 -144
- package/Runtime/Networking/NetworkingPeer.cs.meta +11 -11
- package/Runtime/Networking/NetworkingPeerAPI.cs.meta +11 -11
- package/Runtime/Networking/OperationPending.cs +95 -95
- package/Runtime/Networking/OperationPending.cs.meta +11 -11
- package/Runtime/Networking/PeerBase.cs +242 -242
- package/Runtime/Networking/PeerBase.cs.meta +11 -11
- package/Runtime/Networking/Socket/NetworkingPeerSocketV2.cs +185 -183
- package/Runtime/Networking/Socket/NetworkingPeerSocketV2.cs.meta +11 -11
- package/Runtime/Networking/Socket/NetworkingPeerSocketV3.cs +177 -175
- package/Runtime/Networking/Socket/NetworkingPeerSocketV3.cs.meta +11 -11
- package/Runtime/Networking/Socket/NetworkingSocketPeerBase.cs.meta +11 -11
- package/Runtime/Networking/Socket/SocketPeer.cs +197 -191
- 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/ServiceUpdate.cs +20 -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,12 +1,12 @@
|
|
|
1
|
-
namespace XmobiTea.GN.Constant
|
|
2
|
-
{
|
|
3
|
-
public class ParameterCode
|
|
4
|
-
{
|
|
5
|
-
public const string AuthToken = "A";
|
|
6
|
-
public const string Ts = "T";
|
|
7
|
-
public const string ErrorCode = "E";
|
|
8
|
-
public const string UserId = "U";
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
}
|
|
1
|
+
namespace XmobiTea.GN.Constant
|
|
2
|
+
{
|
|
3
|
+
public class ParameterCode
|
|
4
|
+
{
|
|
5
|
+
public const string AuthToken = "A";
|
|
6
|
+
public const string Ts = "T";
|
|
7
|
+
public const string ErrorCode = "E";
|
|
8
|
+
public const string UserId = "U";
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 0a08aef8bb0d39b4f83b7ed3e50a857d
|
|
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: 0a08aef8bb0d39b4f83b7ed3e50a857d
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 90f9ed30b6aec824f8304c6cda85a463
|
|
3
|
-
folderAsset: yes
|
|
4
|
-
DefaultImporter:
|
|
5
|
-
externalObjects: {}
|
|
6
|
-
userData:
|
|
7
|
-
assetBundleName:
|
|
8
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 90f9ed30b6aec824f8304c6cda85a463
|
|
3
|
+
folderAsset: yes
|
|
4
|
+
DefaultImporter:
|
|
5
|
+
externalObjects: {}
|
|
6
|
+
userData:
|
|
7
|
+
assetBundleName:
|
|
8
|
+
assetBundleVariant:
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
namespace XmobiTea.GN.Constant
|
|
2
|
-
{
|
|
3
|
-
public class ReturnCode
|
|
4
|
-
{
|
|
5
|
-
public const int SecretInvalid = -10;
|
|
6
|
-
public const int MaxSizeRequestReject = -9;
|
|
7
|
-
public const int MaxRequestReject = -8;
|
|
8
|
-
public const int MaxCCUReject = -7;
|
|
9
|
-
|
|
10
|
-
public const int OperationNotAuthorized = -6;
|
|
11
|
-
public const int InvalidRequestParameters = -5;
|
|
12
|
-
public const int OperationInvalid = -4;
|
|
13
|
-
public const int InternalServerError = -3;
|
|
14
|
-
public const int OperationNotAllow = -2;
|
|
15
|
-
public const int OperationTimeout = -1;
|
|
16
|
-
|
|
17
|
-
public const int UnknownError = 0;
|
|
18
|
-
|
|
19
|
-
public const int Ok = 1;
|
|
20
|
-
|
|
21
|
-
private ReturnCode() { }
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
}
|
|
1
|
+
namespace XmobiTea.GN.Constant
|
|
2
|
+
{
|
|
3
|
+
public class ReturnCode
|
|
4
|
+
{
|
|
5
|
+
public const int SecretInvalid = -10;
|
|
6
|
+
public const int MaxSizeRequestReject = -9;
|
|
7
|
+
public const int MaxRequestReject = -8;
|
|
8
|
+
public const int MaxCCUReject = -7;
|
|
9
|
+
|
|
10
|
+
public const int OperationNotAuthorized = -6;
|
|
11
|
+
public const int InvalidRequestParameters = -5;
|
|
12
|
+
public const int OperationInvalid = -4;
|
|
13
|
+
public const int InternalServerError = -3;
|
|
14
|
+
public const int OperationNotAllow = -2;
|
|
15
|
+
public const int OperationTimeout = -1;
|
|
16
|
+
|
|
17
|
+
public const int UnknownError = 0;
|
|
18
|
+
|
|
19
|
+
public const int Ok = 1;
|
|
20
|
+
|
|
21
|
+
private ReturnCode() { }
|
|
22
|
+
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: f314b001d9974ee4ca5f4b83c7d9b0d6
|
|
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: f314b001d9974ee4ca5f4b83c7d9b0d6
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/Runtime/Constant.meta
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: eb9efcaf637bf3941acd1cde544b40da
|
|
3
|
-
folderAsset: yes
|
|
4
|
-
DefaultImporter:
|
|
5
|
-
externalObjects: {}
|
|
6
|
-
userData:
|
|
7
|
-
assetBundleName:
|
|
8
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: eb9efcaf637bf3941acd1cde544b40da
|
|
3
|
+
folderAsset: yes
|
|
4
|
+
DefaultImporter:
|
|
5
|
+
externalObjects: {}
|
|
6
|
+
userData:
|
|
7
|
+
assetBundleName:
|
|
8
|
+
assetBundleVariant:
|
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
using System;
|
|
2
|
-
using System.Reflection;
|
|
3
|
-
using XmobiTea.GN.Common;
|
|
4
|
-
|
|
5
|
-
namespace XmobiTea.GN.Entity
|
|
6
|
-
{
|
|
7
|
-
public interface IGNEnhancedObjectFieldMetadata : GNObjectFieldMetadata
|
|
8
|
-
{
|
|
9
|
-
string code { get; set; }
|
|
10
|
-
bool isOptional { get; set; }
|
|
11
|
-
GNFieldDataType gnFieldType { get; set; }
|
|
12
|
-
object defaultValue { get; set; }
|
|
13
|
-
|
|
14
|
-
bool activeConditionValid { get; set; }
|
|
15
|
-
|
|
16
|
-
bool? mustNonNull { get; set; }
|
|
17
|
-
int? minLength { get; set; }
|
|
18
|
-
int? maxLength { get; set; }
|
|
19
|
-
double? minValue { get; set; }
|
|
20
|
-
double? maxValue { get; set; }
|
|
21
|
-
bool? mustInt { get; set; }
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public class GNEnhancedObjectFieldMetadata : IGNEnhancedObjectFieldMetadata
|
|
25
|
-
{
|
|
26
|
-
public string code { get; set; }
|
|
27
|
-
public bool isOptional { get; set; }
|
|
28
|
-
public GNFieldDataType gnFieldType { get; set; }
|
|
29
|
-
public object defaultValue { get; set; }
|
|
30
|
-
public bool activeConditionValid { get; set; }
|
|
31
|
-
public bool? mustNonNull { get; set; }
|
|
32
|
-
public int? minLength { get; set; }
|
|
33
|
-
public int? maxLength { get; set; }
|
|
34
|
-
public double? minValue { get; set; }
|
|
35
|
-
public double? maxValue { get; set; }
|
|
36
|
-
public bool? mustInt { get; set; }
|
|
37
|
-
|
|
38
|
-
public string name { get; }
|
|
39
|
-
public FieldDataType fieldType { get; }
|
|
40
|
-
public Type cls { get; }
|
|
41
|
-
|
|
42
|
-
public FieldInfo fieldInfo { get; }
|
|
43
|
-
|
|
44
|
-
public GNEnhancedObjectFieldMetadata(string name, FieldDataType fieldType, Type cls, FieldInfo fieldInfo)
|
|
45
|
-
{
|
|
46
|
-
this.name = name;
|
|
47
|
-
this.fieldType = fieldType;
|
|
48
|
-
this.cls = cls;
|
|
49
|
-
|
|
50
|
-
this.fieldInfo = fieldInfo;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
public enum GNFieldDataType
|
|
55
|
-
{
|
|
56
|
-
Other = 0,
|
|
57
|
-
Number = 1,
|
|
58
|
-
String = 2,
|
|
59
|
-
Boolean = 3,
|
|
60
|
-
GNHashtable = 4,
|
|
61
|
-
GNArray = 5,
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
[AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
|
|
66
|
-
public class DataMemberAttribute : Attribute
|
|
67
|
-
{
|
|
68
|
-
public virtual GNFieldDataType gnFieldType => GNFieldDataType.Other;
|
|
69
|
-
|
|
70
|
-
public string code { get; set; }
|
|
71
|
-
public bool isOptional { get; set; } = false;
|
|
72
|
-
|
|
73
|
-
public object defaultValue { get; set; } = null;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
public class StringDataMemberAttribute : DataMemberAttribute
|
|
77
|
-
{
|
|
78
|
-
public override GNFieldDataType gnFieldType => GNFieldDataType.String;
|
|
79
|
-
|
|
80
|
-
public new string defaultValue { get; set; }
|
|
81
|
-
|
|
82
|
-
public bool mustNonNull { get; set; } = false;
|
|
83
|
-
public int minLength { get; set; } = -1;
|
|
84
|
-
public int maxLength { get; set; } = -1;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
public class BooleanDataMemberAttribute : DataMemberAttribute
|
|
88
|
-
{
|
|
89
|
-
public override GNFieldDataType gnFieldType => GNFieldDataType.Boolean;
|
|
90
|
-
|
|
91
|
-
public new bool defaultValue { get; set; } = false;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
public class GNHashtableDataMemberAttribute : DataMemberAttribute
|
|
95
|
-
{
|
|
96
|
-
public override GNFieldDataType gnFieldType => GNFieldDataType.GNHashtable;
|
|
97
|
-
|
|
98
|
-
public new GNHashtable defaultValue { get; set; } = null;
|
|
99
|
-
public bool mustNonNull { get; set; } = false;
|
|
100
|
-
public int minLength { get; set; } = -1;
|
|
101
|
-
public int maxLength { get; set; } = -1;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
public class GNArrayDataMemberAttribute : DataMemberAttribute
|
|
105
|
-
{
|
|
106
|
-
public override GNFieldDataType gnFieldType => GNFieldDataType.GNArray;
|
|
107
|
-
|
|
108
|
-
public new GNArray defaultValue { get; set; } = null;
|
|
109
|
-
public bool mustNonNull { get; set; } = false;
|
|
110
|
-
public int minLength { get; set; } = -1;
|
|
111
|
-
public int maxLength { get; set; } = -1;
|
|
112
|
-
public Type elementCls { get; set; } = null;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
public class NumberDataMemberAttribute : DataMemberAttribute
|
|
116
|
-
{
|
|
117
|
-
public override GNFieldDataType gnFieldType => GNFieldDataType.Number;
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
public double minValue { get; set; } = -1;
|
|
121
|
-
public double maxValue { get; set; } = -1;
|
|
122
|
-
public bool mustInt { get; set; } = false;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
1
|
+
using System;
|
|
2
|
+
using System.Reflection;
|
|
3
|
+
using XmobiTea.GN.Common;
|
|
4
|
+
|
|
5
|
+
namespace XmobiTea.GN.Entity
|
|
6
|
+
{
|
|
7
|
+
public interface IGNEnhancedObjectFieldMetadata : GNObjectFieldMetadata
|
|
8
|
+
{
|
|
9
|
+
string code { get; set; }
|
|
10
|
+
bool isOptional { get; set; }
|
|
11
|
+
GNFieldDataType gnFieldType { get; set; }
|
|
12
|
+
object defaultValue { get; set; }
|
|
13
|
+
|
|
14
|
+
bool activeConditionValid { get; set; }
|
|
15
|
+
|
|
16
|
+
bool? mustNonNull { get; set; }
|
|
17
|
+
int? minLength { get; set; }
|
|
18
|
+
int? maxLength { get; set; }
|
|
19
|
+
double? minValue { get; set; }
|
|
20
|
+
double? maxValue { get; set; }
|
|
21
|
+
bool? mustInt { get; set; }
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
public class GNEnhancedObjectFieldMetadata : IGNEnhancedObjectFieldMetadata
|
|
25
|
+
{
|
|
26
|
+
public string code { get; set; }
|
|
27
|
+
public bool isOptional { get; set; }
|
|
28
|
+
public GNFieldDataType gnFieldType { get; set; }
|
|
29
|
+
public object defaultValue { get; set; }
|
|
30
|
+
public bool activeConditionValid { get; set; }
|
|
31
|
+
public bool? mustNonNull { get; set; }
|
|
32
|
+
public int? minLength { get; set; }
|
|
33
|
+
public int? maxLength { get; set; }
|
|
34
|
+
public double? minValue { get; set; }
|
|
35
|
+
public double? maxValue { get; set; }
|
|
36
|
+
public bool? mustInt { get; set; }
|
|
37
|
+
|
|
38
|
+
public string name { get; }
|
|
39
|
+
public FieldDataType fieldType { get; }
|
|
40
|
+
public Type cls { get; }
|
|
41
|
+
|
|
42
|
+
public FieldInfo fieldInfo { get; }
|
|
43
|
+
|
|
44
|
+
public GNEnhancedObjectFieldMetadata(string name, FieldDataType fieldType, Type cls, FieldInfo fieldInfo)
|
|
45
|
+
{
|
|
46
|
+
this.name = name;
|
|
47
|
+
this.fieldType = fieldType;
|
|
48
|
+
this.cls = cls;
|
|
49
|
+
|
|
50
|
+
this.fieldInfo = fieldInfo;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public enum GNFieldDataType
|
|
55
|
+
{
|
|
56
|
+
Other = 0,
|
|
57
|
+
Number = 1,
|
|
58
|
+
String = 2,
|
|
59
|
+
Boolean = 3,
|
|
60
|
+
GNHashtable = 4,
|
|
61
|
+
GNArray = 5,
|
|
62
|
+
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
[AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
|
|
66
|
+
public class DataMemberAttribute : Attribute
|
|
67
|
+
{
|
|
68
|
+
public virtual GNFieldDataType gnFieldType => GNFieldDataType.Other;
|
|
69
|
+
|
|
70
|
+
public string code { get; set; }
|
|
71
|
+
public bool isOptional { get; set; } = false;
|
|
72
|
+
|
|
73
|
+
public object defaultValue { get; set; } = null;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
public class StringDataMemberAttribute : DataMemberAttribute
|
|
77
|
+
{
|
|
78
|
+
public override GNFieldDataType gnFieldType => GNFieldDataType.String;
|
|
79
|
+
|
|
80
|
+
public new string defaultValue { get; set; }
|
|
81
|
+
|
|
82
|
+
public bool mustNonNull { get; set; } = false;
|
|
83
|
+
public int minLength { get; set; } = -1;
|
|
84
|
+
public int maxLength { get; set; } = -1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
public class BooleanDataMemberAttribute : DataMemberAttribute
|
|
88
|
+
{
|
|
89
|
+
public override GNFieldDataType gnFieldType => GNFieldDataType.Boolean;
|
|
90
|
+
|
|
91
|
+
public new bool defaultValue { get; set; } = false;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
public class GNHashtableDataMemberAttribute : DataMemberAttribute
|
|
95
|
+
{
|
|
96
|
+
public override GNFieldDataType gnFieldType => GNFieldDataType.GNHashtable;
|
|
97
|
+
|
|
98
|
+
public new GNHashtable defaultValue { get; set; } = null;
|
|
99
|
+
public bool mustNonNull { get; set; } = false;
|
|
100
|
+
public int minLength { get; set; } = -1;
|
|
101
|
+
public int maxLength { get; set; } = -1;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
public class GNArrayDataMemberAttribute : DataMemberAttribute
|
|
105
|
+
{
|
|
106
|
+
public override GNFieldDataType gnFieldType => GNFieldDataType.GNArray;
|
|
107
|
+
|
|
108
|
+
public new GNArray defaultValue { get; set; } = null;
|
|
109
|
+
public bool mustNonNull { get; set; } = false;
|
|
110
|
+
public int minLength { get; set; } = -1;
|
|
111
|
+
public int maxLength { get; set; } = -1;
|
|
112
|
+
public Type elementCls { get; set; } = null;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
public class NumberDataMemberAttribute : DataMemberAttribute
|
|
116
|
+
{
|
|
117
|
+
public override GNFieldDataType gnFieldType => GNFieldDataType.Number;
|
|
118
|
+
|
|
119
|
+
public new double defaultValue { get; set; }
|
|
120
|
+
public double minValue { get; set; } = -1;
|
|
121
|
+
public double maxValue { get; set; } = -1;
|
|
122
|
+
public bool mustInt { get; set; } = false;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -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,27 @@
|
|
|
1
|
-
namespace XmobiTea.GN.Entity
|
|
2
|
-
{
|
|
3
|
-
using System;
|
|
4
|
-
|
|
5
|
-
public enum FieldDataType
|
|
6
|
-
{
|
|
7
|
-
Boolean = 0,
|
|
8
|
-
Number = 1,
|
|
9
|
-
String = 2,
|
|
10
|
-
Array = 3,
|
|
11
|
-
Object = 4,
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public interface GNObjectFieldMetadata
|
|
15
|
-
{
|
|
16
|
-
string name { get; }
|
|
17
|
-
FieldDataType fieldType { get; }
|
|
18
|
-
Type cls { get; }
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
public interface GNObjectMetadata
|
|
22
|
-
{
|
|
23
|
-
string id { get; }
|
|
24
|
-
GNObjectFieldMetadata[] fields { get; }
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}
|
|
1
|
+
namespace XmobiTea.GN.Entity
|
|
2
|
+
{
|
|
3
|
+
using System;
|
|
4
|
+
|
|
5
|
+
public enum FieldDataType
|
|
6
|
+
{
|
|
7
|
+
Boolean = 0,
|
|
8
|
+
Number = 1,
|
|
9
|
+
String = 2,
|
|
10
|
+
Array = 3,
|
|
11
|
+
Object = 4,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public interface GNObjectFieldMetadata
|
|
15
|
+
{
|
|
16
|
+
string name { get; }
|
|
17
|
+
FieldDataType fieldType { get; }
|
|
18
|
+
Type cls { get; }
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
public interface GNObjectMetadata
|
|
22
|
+
{
|
|
23
|
+
string id { get; }
|
|
24
|
+
GNObjectFieldMetadata[] fields { get; }
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
}
|
|
@@ -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:
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
namespace XmobiTea.GN.Entity
|
|
2
|
-
{
|
|
3
|
-
using System.Text;
|
|
4
|
-
using XmobiTea.GN.Constant;
|
|
5
|
-
|
|
6
|
-
public struct InvalidMember
|
|
7
|
-
{
|
|
8
|
-
public string code { get; private set; }
|
|
9
|
-
public InvalidMemberType invalidMemberType { get; private set; }
|
|
10
|
-
|
|
11
|
-
public InvalidMember(string code, InvalidMemberType invalidMemberType)
|
|
12
|
-
{
|
|
13
|
-
this.code = code;
|
|
14
|
-
this.invalidMemberType = invalidMemberType;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
public string toString()
|
|
18
|
-
{
|
|
19
|
-
var stringBuilder = new StringBuilder();
|
|
20
|
-
|
|
21
|
-
stringBuilder.Append("Code: " + this.code + ", InvalidMemberType " + this.invalidMemberType);
|
|
22
|
-
|
|
23
|
-
return stringBuilder.ToString();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
public override string ToString()
|
|
27
|
-
{
|
|
28
|
-
return this.toString();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
}
|
|
1
|
+
namespace XmobiTea.GN.Entity
|
|
2
|
+
{
|
|
3
|
+
using System.Text;
|
|
4
|
+
using XmobiTea.GN.Constant;
|
|
5
|
+
|
|
6
|
+
public struct InvalidMember
|
|
7
|
+
{
|
|
8
|
+
public string code { get; private set; }
|
|
9
|
+
public InvalidMemberType invalidMemberType { get; private set; }
|
|
10
|
+
|
|
11
|
+
public InvalidMember(string code, InvalidMemberType invalidMemberType)
|
|
12
|
+
{
|
|
13
|
+
this.code = code;
|
|
14
|
+
this.invalidMemberType = invalidMemberType;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public string toString()
|
|
18
|
+
{
|
|
19
|
+
var stringBuilder = new StringBuilder();
|
|
20
|
+
|
|
21
|
+
stringBuilder.Append("Code: " + this.code + ", InvalidMemberType " + this.invalidMemberType);
|
|
22
|
+
|
|
23
|
+
return stringBuilder.ToString();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public override string ToString()
|
|
27
|
+
{
|
|
28
|
+
return this.toString();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 163b213b0c171b44499506a968a84010
|
|
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: 163b213b0c171b44499506a968a84010
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: de1a7864ab646b1488f2a2fd48968452
|
|
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: de1a7864ab646b1488f2a2fd48968452
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: b1bef5f99961c4d4f9720717d7d027a6
|
|
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: b1bef5f99961c4d4f9720717d7d027a6
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 3478f1024ee96084f85eaf91495700e6
|
|
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: 3478f1024ee96084f85eaf91495700e6
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|