mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
update
This commit is contained in:
39
luban_examples/Projects/CfgValidator/Gen/test.TbSingleton.cs
Normal file
39
luban_examples/Projects/CfgValidator/Gen/test.TbSingleton.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public partial class TbSingleton
|
||||
{
|
||||
|
||||
private readonly test.DemoSingletonType _data;
|
||||
|
||||
public TbSingleton(JsonElement _buf)
|
||||
{
|
||||
int n = _buf.GetArrayLength();
|
||||
if (n != 1) throw new SerializationException("table mode=one, but size != 1");
|
||||
_data = test.DemoSingletonType.DeserializeDemoSingletonType(_buf[0]);
|
||||
}
|
||||
|
||||
|
||||
public int Id => _data.Id;
|
||||
public string Name => _data.Name;
|
||||
public test.DemoDynamic Date => _data.Date;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
_data.ResolveRef(tables);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user