csharp.enumClass.mustache Maven / Gradle / Ivy
///
/// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}}
///
{{#description}}
/// {{.}}
{{/description}}
{{^useGenericHost}}
[JsonConverter(typeof(StringEnumConverter))]
{{/useGenericHost}}
{{>visibility}} enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}
{
{{#allowableValues}}
{{#enumVars}}
///
/// Enum {{name}} for {{{value}}}
///
[EnumMember(Value = {{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isFloat}}"{{/isFloat}}{{#isDouble}}"{{/isDouble}}{{{value}}}{{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isFloat}}"{{/isFloat}})]
{{name}}{{#isLong}} = {{{value}}}{{/isLong}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^isInteger}} = {{-index}}{{/isInteger}}{{^-last}},{{/-last}}
{{/enumVars}}
{{/allowableValues}}
}