
aspnetcore.3.0.enumClass.mustache Maven / Gradle / Ivy
///
/// {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}}
///
{{#description}}
/// {{{.}}}
{{/description}}
{{#allowableValues}}{{#enumVars}}{{#-first}}{{#isString}}{{#useNewtonsoft}}[TypeConverter(typeof(CustomEnumConverter<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}>))]
[JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]{{/useNewtonsoft}}{{/isString}}{{/-first}}{{/enumVars}}{{/allowableValues}}
public enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}
{
{{#allowableValues}}{{#enumVars}}
///
/// Enum {{name}} for {{{value}}}
///
{{#isString}}[EnumMember(Value = "{{{value}}}")]{{/isString}}
{{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}},
{{/-last}}{{/enumVars}}{{/allowableValues}}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy