EnumKeyAttribute class
namespace: Serenity.ComponentModel assembly: Serenity.Net.Core
Sets the enumeration key of an enum, or of a StringEnum, which is used as the Enums.<EnumKey>.<Name> prefix of its member texts.
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Enum)]
public class EnumKeyAttribute : Attribute
Public Members
| name | description |
|---|---|
| EnumKeyAttribute() | Initializes a new instance of the EnumKeyAttribute class with the key inferred from module attribute, if available and namespace. |
| EnumKeyAttribute(…) | Initializes a new instance of the EnumKeyAttribute class with the specified key. |
| InferKey { get; } | Gets a value indicating whether the key should be inferred. |
| Value { get; } | Gets the enum key. |
| static AutoEnumKeyFor(…) | Automatically generates an enum key for the specified type based on its module and name. |
See Also
- Source: EnumKeyAttribute.cs