Class HumlEnumValueAttribute
- Namespace
- Huml.Net.Serialization
- Assembly
- Huml.Net.dll
Overrides the HUML string name used to represent an individual enum member during serialisation and deserialisation.
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
public sealed class HumlEnumValueAttribute : Attribute
- Inheritance
-
HumlEnumValueAttribute
- Inherited Members
Remarks
When applied to an enum member, the specified Name is used instead of the member name (or any transform applied by HumlNamingPolicy). If both HumlEnumValueAttribute and a naming policy are present, the attribute name always takes precedence.
Constructors
HumlEnumValueAttribute(string)
Initialises a new instance with the override name.
public HumlEnumValueAttribute(string name)
Parameters
namestringThe HUML name to use instead of the member name.
Properties
Name
The HUML string name for this enum member.
public string Name { get; }