71 lines
1.9 KiB
C#
71 lines
1.9 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.DeviceCfg
|
|
{
|
|
|
|
public sealed partial class DataDevice : Bright.Config.BeanBase
|
|
{
|
|
public DataDevice(JSONNode _json)
|
|
{
|
|
{ if(!_json["DeviceName"].IsString) { throw new SerializationException(); } DeviceName = _json["DeviceName"]; }
|
|
{ if(!_json["PerformanceId"].IsNumber) { throw new SerializationException(); } PerformanceId = _json["PerformanceId"]; }
|
|
PostInit();
|
|
}
|
|
|
|
public DataDevice(string DeviceName, int PerformanceId )
|
|
{
|
|
this.DeviceName = DeviceName;
|
|
this.PerformanceId = PerformanceId;
|
|
PostInit();
|
|
}
|
|
|
|
public static DataDevice DeserializeDataDevice(JSONNode _json)
|
|
{
|
|
return new DeviceCfg.DataDevice(_json);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 机型名字
|
|
/// </summary>
|
|
public string DeviceName { get; private set; }
|
|
/// <summary>
|
|
/// 默认使用性能id
|
|
/// </summary>
|
|
public int PerformanceId { get; private set; }
|
|
|
|
public const int __ID__ = -1301252448;
|
|
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 "{ "
|
|
+ "DeviceName:" + DeviceName + ","
|
|
+ "PerformanceId:" + PerformanceId + ","
|
|
+ "}";
|
|
}
|
|
|
|
partial void PostInit();
|
|
partial void PostResolve();
|
|
}
|
|
}
|