EnumType

Description

sealed class Tinman.Core.Config.EnumType

Derived from

ConfigType abstract

Config property type: enumeration type.

This type should not be used as the target for type casting expressions, see ConfigType.IsEnum for details.

Public / Constructors

Builder


public static method Builder → (2)

name in : string

[not-empty]
The enum name.

module in : TinmanModule

[not-null]
The module that owns the new enum type.

returns → EnumTypeBuilder

The builder object.

Returns a builder for creating a new enum type.

Of


public static method Of → (1)

type in : ConfigType

The type or null.

returns → EnumType

The result of ConfigType.AsEnumNull or null if type in is null.

Helper that calls ConfigType.AsEnumNull on the given type in.

Public / Methods

Get​Item


public method GetItem → (1)

index in : int32

[0..EnumType.ItemCount-1]
Index of enum item.

returns → EnumItem

The enum item.

Returns an enum item.

Get​Item​Ordinal


public method GetItemOrdinal → (2)

name in : string

The enum item name.

tag opt : bool = false

Use tag name?

returns → int32

Ordinal number of enum item or -1 if name in is not a valid enum item name.

Returns the ordinal number of the given enum item.

Public / Attributes

Item​Count


public attribute ItemCount → (get)

value : int32

[>0]
The number of enumeration items.

Returns the number of enumeration items.

Items


public attribute Items → (get)

value : EnumItem [ ]

[not-null]
The enum items.

Returns the items of this enumeration.

Should​Have​Documentation


public attribute ShouldHaveDocumentation → (get)

value : bool

true if documentation should exist, false if not (e.g. if the enum items are generated by code, having meaningful names).

Should the item of this enumeration be documented?