enum.tpl 660 B

123456789101112131415161718192021222324252627282930
  1. {{~
  2. name = x.name
  3. namespace_with_top_module = x.namespace_with_top_module
  4. comment = x.comment
  5. items = x.items
  6. ~}}
  7. {{cs_start_name_space_grace x.namespace_with_top_module}}
  8. {{~if comment != '' ~}}
  9. /// <summary>
  10. /// {{comment | html.escape}}
  11. /// </summary>
  12. {{~end~}}
  13. {{~if x.is_flags~}}
  14. [System.Flags]
  15. {{~end~}}
  16. public enum {{name}}
  17. {
  18. {{~ for item in items ~}}
  19. {{~if item.comment != '' ~}}
  20. /// <summary>
  21. /// {{item.escape_comment}}
  22. /// </summary>
  23. {{~end~}}
  24. {{item.name}} = {{item.value}},
  25. {{~end~}}
  26. }
  27. {{cs_end_name_space_grace x.namespace_with_top_module}}