Skip to main content

EnumNamingStrategy

Namespace: Riok.Mapperly.Abstractions

Defines the strategy to use when mapping an enum from/to string.

public enum EnumNamingStrategy

Inheritance ObjectValueTypeEnumEnumNamingStrategy
Implements IComparable, ISpanFormattable, IFormattable, IConvertible

Fields

NameValueDescription
MemberName0Matches enum values using their name.
CamelCase1Matches enum values using camelCase.
PascalCase2Matches enum values using PascalCase.
SnakeCase3Matches enum values using snake_case.
UpperSnakeCase4Matches enum values using UPPER_SNAKE_CASE.
KebabCase5Matches enum values using kebab-case.
UpperKebabCase6Matches enum values using UPPER-KEBAB-CASE.
ComponentModelDescriptionAttribute7Matches enum values using or EnumNamingStrategy.MemberName if the attribute is not present on the enum member.
SerializationEnumMemberAttribute8Matches enum values using or EnumNamingStrategy.MemberName if the attribute is not present on the enum member.