65 lines
1.8 KiB
C#
65 lines
1.8 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
|
|
{
|
|
|
|
public sealed partial class TbEventPartnerMain2
|
|
{
|
|
private readonly Dictionary<int, EventPartnerMain2> _dataMap;
|
|
private readonly List<EventPartnerMain2> _dataList;
|
|
|
|
public TbEventPartnerMain2(JSONNode _json)
|
|
{
|
|
_dataMap = new Dictionary<int, EventPartnerMain2>();
|
|
_dataList = new List<EventPartnerMain2>();
|
|
|
|
foreach(JSONNode _row in _json.Children)
|
|
{
|
|
var _v = EventPartnerMain2.DeserializeEventPartnerMain2(_row);
|
|
_dataList.Add(_v);
|
|
_dataMap.Add(_v.ID, _v);
|
|
}
|
|
PostInit();
|
|
}
|
|
|
|
public Dictionary<int, EventPartnerMain2> DataMap => _dataMap;
|
|
public List<EventPartnerMain2> DataList => _dataList;
|
|
|
|
public EventPartnerMain2 GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
|
public EventPartnerMain2 Get(int key) => _dataMap[key];
|
|
public EventPartnerMain2 this[int key] => _dataMap[key];
|
|
|
|
public void Resolve(Dictionary<string, object> _tables)
|
|
{
|
|
foreach(var v in _dataList)
|
|
{
|
|
v.Resolve(_tables);
|
|
}
|
|
PostResolve();
|
|
}
|
|
|
|
public void TranslateText(System.Func<string, string, string> translator)
|
|
{
|
|
foreach(var v in _dataList)
|
|
{
|
|
v.TranslateText(translator);
|
|
}
|
|
}
|
|
|
|
|
|
partial void PostInit();
|
|
partial void PostResolve();
|
|
}
|
|
|
|
} |