Enum Class

Assembly: CodeEffects.Rule.Editor.dll
Namespace: CodeEffects.Rule.Editor.Client

Summary

Describes an enumeration that a field, parameter, or return of an Adaptive Source uses, together with its members. Members are Pair objects. A source holds its enumerations in the Enums property of Source.

Syntax

public class Enum

Properties

  • Name

    Type: System.String

    The name of the enumeration. Settings.TypeOrAliasName of an enumeration field refers to it.

  • Members

    Type: ICollection<Pair>

    The members of the enumeration. For each member, ID is its numeric value as a string and Name is its display name. The default value is an empty collection.

Remarks

Source.GetEnum(Type, string) creates an Enum from a CLR enumeration type. The class has no public namespace property; the namespace is kept internally.

Example

using System.Collections.Generic;
using CodeEffects.Rule.Editor.Client;

var status = new Enum
{
	Name = "Status",
	Members = new List<Pair>
	{
		new Pair("0", "Open"),
		new Pair("1", "Closed")
	}
};

Ask on Stack Overflow - Yes, it's still active
Ask in GitHub Discussions

p102

l097 --

l102

p101

×