Navigation

Categories
Show Navigation Next Topic  »

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 and become a part of our growing community