tables.sbn 835 B

12345678910111213141516171819202122232425262728293031
  1. using Luban;
  2. {{namespace_with_grace_begin __namespace}}
  3. public partial class {{__name}}
  4. {
  5. {{~for table in __tables ~}}
  6. {{~if table.comment != '' ~}}
  7. /// <summary>
  8. /// {{escape_comment table.comment}}
  9. /// </summary>
  10. {{~end~}}
  11. public {{table.full_name}} {{format_property_name __code_style table.name}} {get; }
  12. {{~end~}}
  13. public {{__name}}(System.Func<string, ByteBuf> loader)
  14. {
  15. {{~for table in __tables ~}}
  16. {{format_property_name __code_style table.name}} = new {{table.full_name}}(loader("{{table.output_data_file}}"));
  17. {{~end~}}
  18. ResolveRef();
  19. }
  20. private void ResolveRef()
  21. {
  22. {{~for table in __tables ~}}
  23. {{format_property_name __code_style table.name}}.ResolveRef(this);
  24. {{~end~}}
  25. }
  26. }
  27. {{namespace_with_grace_end __namespace}}