EnumTypeBuilder

Description

sealed class Tinman.Core.Config.EnumTypeBuilder

Builder for EnumType objects.

Public / Methods

Build


public method Build → ()

returns → EnumType

The built enum type.

Builds the enum type.

ConfigException

If the enum type specification in invalid.

Code​Gen


public method CodeGen → ()

returns → EnumTypeBuilder

this

The enum type is being built by a code generator.

For automatically generated enum types, the EnumType.ShouldHaveDocumentation property will return false.

Default​Item


public method DefaultItem → (2)

name in : string

[not-empty]
The item name.

tag opt : string = null

Optional string tag to use for conversion to ConfigType.Str.

returns → EnumTypeBuilder

this

Adds the default enumeration item.

Has


public method Has → (1)

name in : string

The enum item name.

returns → bool

true if name in has been specified as an enum item,
false if there is no enum item of the given name in.

Checks if an enum item of the given name in has been specified.

Item


public method Item → (2)

name in : string

[not-empty]
The item name.

tag opt : string = null

Optional string tag to use for conversion to ConfigType.Str.

returns → EnumTypeBuilder

this

Adds an enumeration item.

Sort


public method Sort → (1)

defaultFirst opt : bool = false

true to put the default item first, false to treat the default item like all others.

returns → EnumTypeBuilder

this

Sorts the enum items that have been specified so far.