//------------------------------------------------------------------------------
//
// 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.AreaCfg
{
public sealed partial class DataArea : Bright.Config.BeanBase
{
public DataArea(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["Name"].IsString) { throw new SerializationException(); } Name = _json["Name"]; }
{ if(!_json["DESC"].IsString) { throw new SerializationException(); } DESC = _json["DESC"]; }
{ var __json0 = _json["Points"]; if(!__json0.IsArray) { throw new SerializationException(); } Points = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Points.Add(__v0); } }
PostInit();
}
public DataArea(int ID, string Name, string DESC, System.Collections.Generic.List Points )
{
this.ID = ID;
this.Name = Name;
this.DESC = DESC;
this.Points = Points;
PostInit();
}
public static DataArea DeserializeDataArea(JSONNode _json)
{
return new AreaCfg.DataArea(_json);
}
///
/// 配置用ID
///
public int ID { get; private set; }
///
/// 名字
///
public string Name { get; private set; }
///
/// 描述
///
public string DESC { get; private set; }
///
/// 点位数据
///
public System.Collections.Generic.List Points { get; private set; }
public const int __ID__ = 2026853134;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "Name:" + Name + ","
+ "DESC:" + DESC + ","
+ "Points:" + Bright.Common.StringUtil.CollectionToString(Points) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}