//------------------------------------------------------------------------------
//
// 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 GeneralCardWeight : Bright.Config.BeanBase
{
public JSONNode json;
public GeneralCardWeight(JSONNode _json)
{
{ if(!_json["CardBoxID"].IsNumber) { throw new SerializationException(); } CardBoxID = _json["CardBoxID"]; }
{ var __json0 = _json["Weight"]; if(!__json0.IsArray) { throw new SerializationException(); } Weight = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Weight.Add(__v0); } }
{ var __json0 = _json["CountByQuality"]; if(!__json0.IsArray) { throw new SerializationException(); } CountByQuality = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } CountByQuality.Add(__v0); } }
{ var __json0 = _json["BgNameList"]; if(!__json0.IsArray) { throw new SerializationException(); } BgNameList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { string __v0; { if(!__e0.IsString) { throw new SerializationException(); } __v0 = __e0; } BgNameList.Add(__v0); } }
json = _json;
PostInit();
}
public GeneralCardWeight(int CardBoxID, System.Collections.Generic.List Weight, System.Collections.Generic.List CountByQuality, System.Collections.Generic.List BgNameList )
{
this.CardBoxID = CardBoxID;
this.Weight = Weight;
this.CountByQuality = CountByQuality;
this.BgNameList = BgNameList;
PostInit();
}
public static GeneralCardWeight DeserializeGeneralCardWeight(JSONNode _json)
{
return new GeneralCardWeight(_json);
}
public int CardBoxID { get; private set; }
///
/// 当前地图,非当前地图
///
public System.Collections.Generic.List Weight { get; private set; }
///
/// 数量
///
public System.Collections.Generic.List CountByQuality { get; private set; }
public System.Collections.Generic.List BgNameList { get; private set; }
public const int __ID__ = -1423490928;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "CardBoxID:" + CardBoxID + ","
+ "Weight:" + Bright.Common.StringUtil.CollectionToString(Weight) + ","
+ "CountByQuality:" + Bright.Common.StringUtil.CollectionToString(CountByQuality) + ","
+ "BgNameList:" + Bright.Common.StringUtil.CollectionToString(BgNameList) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}