AkiraPixelWind/LubanTools/Luban.ClientServer/Templates/common/cs/enum.tpl
2022-12-29 18:20:40 +08:00

30 lines
586 B
Smarty

{{~
name = x.name
namespace_with_top_module = x.namespace_with_top_module
comment = x.comment
items = x.items
~}}
namespace {{namespace_with_top_module}}
{
{{~if comment != '' ~}}
/// <summary>
/// {{comment | html.escape}}
/// </summary>
{{~end~}}
{{~if x.is_flags~}}
[System.Flags]
{{~end~}}
public enum {{name}}
{
{{~ for item in items ~}}
{{~if item.comment != '' ~}}
/// <summary>
/// {{item.escape_comment}}
/// </summary>
{{~end~}}
{{item.name}} = {{item.value}},
{{~end~}}
}
}