//------------------------------------------------------------------------------ // // This code was generated by a tool. // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ using Bright.Serialization; using System.Collections.Generic; using SimpleJSON; namespace cfg { public sealed partial class DataSystemCfg : Bright.Config.BeanBase { public DataSystemCfg(JSONNode _json) { { if(!_json["Id"].IsNumber) { throw new SerializationException(); } Id = (ESystemType)_json["Id"].AsInt; } { var __json0 = _json["Unlock"]; if(!__json0.IsArray) { throw new SerializationException(); } int _n0 = __json0.Count; Unlock = new int[_n0]; int __index0=0; foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Unlock[__index0++] = __v0; } } PostInit(); } public DataSystemCfg(ESystemType Id, int[] Unlock ) { this.Id = Id; this.Unlock = Unlock; PostInit(); } public static DataSystemCfg DeserializeDataSystemCfg(JSONNode _json) { return new DataSystemCfg(_json); } /// /// 系统类型 /// public ESystemType Id { get; private set; } /// /// 解锁条件 /// public int[] Unlock { get; private set; } public const int __ID__ = 122753803; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { PostResolve(); } public void TranslateText(System.Func translator) { } public override string ToString() { return "{ " + "Id:" + Id + "," + "Unlock:" + Bright.Common.StringUtil.CollectionToString(Unlock) + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }