EnumItemAttribute class

Namespace: CodeEffects.Rule.Attributes
Assemblies:
CodeEffects.Rule.Editor.Asp.dll
CodeEffects.Rule.Editor.Mvc.dll
CodeEffects.Rule.Editor.Core.dll
CodeEffects.Rule.Editor.Net.dll

If applied to any member of an enumerator that is used by source object as a rule field, provides display name for that member.

Syntax

[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
public class EnumItemAttribute : System.Attribute,
	CodeEffects.Rule.Attributes.IDisplayableAttribute

Properties

  • DisplayName Type: System.String

    Gets or sets the display name for the enum member in the Rule Editor.

Example

using CodeEffects.Rule.Attributes;

public enum State
{
	Arizona,
	California,
	Florida,
	Georgia,
	[EnumItem("North Dakota")]
	NorthDakota,
	[EnumItem("South Carolina")]
	SouthCarolina,
	[ExcludeFromEvaluation]
	Unknown
}
Comments: 0
Post your questions about Code Effects on Stackoverflow.com
and become a part of our growing community
Name (optional):
Comment (URLs are allowed and must start with http:// or https://; all tags will be encoded):
Remaining character count: