This commit is contained in:
huangjun
2026-08-30 07:48:19 +08:00
commit 42ad134759
551 changed files with 68412 additions and 0 deletions
@@ -0,0 +1,23 @@
{{~
comment = __enum.comment
items = __enum.items
~}}
{{namespace_with_grace_begin __namespace}}
{{~if comment != '' ~}}
/// <summary>
/// {{escape_comment comment}}
/// </summary>
{{~end~}}
enum class {{__name}}
{
{{~ for item in items ~}}
{{~if item.comment != '' ~}}
/// <summary>
/// {{escape_comment item.comment_or_alias}}
/// </summary>
{{~end~}}
{{format_enum_item_name __code_style item.name}} = {{item.value}},
{{~end~}}
};
{{namespace_with_grace_end __namespace}}
@@ -0,0 +1,28 @@
{{~
comment = __enum.comment
items = __enum.items
~}}
{{namespace_with_grace_begin __namespace_with_top_module}}
{{~if comment != '' ~}}
/// <summary>
/// {{escape_comment comment}}
/// </summary>
{{~end~}}
{{~if __enum.is_flags~}}
[System.Flags]
{{~end~}}
public enum {{__name}}
{
{{~ for item in items ~}}
{{~if item.comment != '' ~}}
/// <summary>
/// {{escape_comment item.comment_or_alias}}
/// </summary>
{{~end~}}
{{format_enum_item_name __code_style item.name}} = {{item.value}},
{{~end~}}
}
{{namespace_with_grace_end __namespace_with_top_module}}
@@ -0,0 +1,19 @@
{{~if ___top_module != ''~}}
package {{__top_module}};
{{~end~}}
{{~if __this.comment != '' ~}}
/**
* {{escape_comment __this.comment}}
*/
{{~end~}}
const (
{{~ for item in __this.items ~}}
{{~if item.comment_or_alias != '' ~}}
/**
* {{escape_comment item.comment_or_alias}}
*/
{{~end~}}
{{full_name __this}}_{{item.name}} = {{item.int_value}};
{{~end~}}
)
@@ -0,0 +1,19 @@
{{~if __namespace_with_top_module != ''~}}
package {{__namespace_with_top_module}};
{{~end~}}
{{~if __this.comment != '' ~}}
/**
* {{escape_comment __this.comment}}
*/
{{~end~}}
public final class {{__name}} {
{{~ for item in __this.items ~}}
{{~if item.comment_or_alias != '' ~}}
/**
* {{escape_comment item.comment_or_alias}}
*/
{{~end~}}
public static final int {{item.name}} = {{item.int_value}};
{{~end~}}
}
@@ -0,0 +1,2 @@