MapEnumAttribute
Namespace: Riok.Mapperly.Abstractions
Customizes how enums are mapped.
public sealed class MapEnumAttribute : System.Attribute
Inheritance Object → Attribute → MapEnumAttribute
Attributes NullableContextAttribute, NullableAttribute, AttributeUsageAttribute, ConditionalAttribute
Properties
Strategy
The strategy to be used to map enums to enums.
public EnumMappingStrategy Strategy { get; }
Property Value
IgnoreCase
Whether the case should be ignored during mappings.
public bool IgnoreCase { get; set; }
Property Value
FallbackValue
The fallback value if an enum cannot be mapped, used instead of throwing.
public object FallbackValue { get; set; }
Property Value
NamingStrategy
The strategy to be used to map enums from/to strings.
public EnumNamingStrategy NamingStrategy { get; set; }
Property Value
TypeId
public object TypeId { get; }
Property Value
Constructors
MapEnumAttribute(EnumMappingStrategy)
Customizes how enums are mapped.
public MapEnumAttribute(EnumMappingStrategy strategy)
Parameters
strategy
EnumMappingStrategy
The strategy to be used to map enums.