85 lines
2.6 KiB
C#
85 lines
2.6 KiB
C#
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
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<int>(__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<int> 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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 配置用ID
|
|
/// </summary>
|
|
public int ID { get; private set; }
|
|
/// <summary>
|
|
/// 名字
|
|
/// </summary>
|
|
public string Name { get; private set; }
|
|
/// <summary>
|
|
/// 描述
|
|
/// </summary>
|
|
public string DESC { get; private set; }
|
|
/// <summary>
|
|
/// 点位数据
|
|
/// </summary>
|
|
public System.Collections.Generic.List<int> Points { get; private set; }
|
|
|
|
public const int __ID__ = 2026853134;
|
|
public override int GetTypeId() => __ID__;
|
|
|
|
public void Resolve(Dictionary<string, object> _tables)
|
|
{
|
|
PostResolve();
|
|
}
|
|
|
|
public void TranslateText(System.Func<string, string, string> translator)
|
|
{
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return "{ "
|
|
+ "ID:" + ID + ","
|
|
+ "Name:" + Name + ","
|
|
+ "DESC:" + DESC + ","
|
|
+ "Points:" + Bright.Common.StringUtil.CollectionToString(Points) + ","
|
|
+ "}";
|
|
}
|
|
|
|
partial void PostInit();
|
|
partial void PostResolve();
|
|
}
|
|
}
|