enum.sbn 654 B

12345678910111213141516171819202122232425262728
  1. {{~
  2. comment = __enum.comment
  3. items = __enum.items
  4. ~}}
  5. {{namespace_with_grace_begin __namespace_with_top_module}}
  6. {{~if comment != '' ~}}
  7. /// <summary>
  8. /// {{escape_comment comment}}
  9. /// </summary>
  10. {{~end~}}
  11. {{~if __enum.is_flags~}}
  12. [System.Flags]
  13. {{~end~}}
  14. public enum {{__name}}
  15. {
  16. {{~ for item in items ~}}
  17. {{~if item.comment != '' ~}}
  18. /// <summary>
  19. /// {{escape_comment item.comment_or_alias}}
  20. /// </summary>
  21. {{~end~}}
  22. {{format_enum_item_name __code_style item.name}} = {{item.value}},
  23. {{~end~}}
  24. }
  25. {{namespace_with_grace_end __namespace_with_top_module}}