ClassTypeBuilder

Description

sealed class Tinman.Core.Config.ClassTypeBuilder

Builder for ClassType objects.

Public / Methods

Abstract


public method Abstract → ()

returns → ClassTypeBuilder

this

The built class type will be abstract.

Build


public method Build → ()

returns → ClassType

The built class type.

Builds the class type.

ConfigException

If the class type specification in invalid.

Configurator


public method Configurator → (1)

configurator in : IConfiguratorObject

[not-null]
The object configurator.

returns → ClassTypeBuilder

this

The built class type will have an object configurator.

FieldOptional

2 overloads


public method FieldOptional1 → (4)

name in : string

[not-empty]
The field name.

type in : IConfiguratorBase

[not-null]
The field type.

defaultValue opt : ConfigValue = null

The field default value. If null, the default value of type in will be used (see ConfigType.Value) will be used.

constraint opt : string = null

The constraint expression or null.

returns → ClassTypeBuilder

this

Adds an optional class field.

ConfigException

If the given class field specification is invalid.

ValidatingException

If one or more validation errors have occurred for the constraint opt expression.


public method FieldOptional2 → (4)

name in : string

[not-empty]
The field name.

type in : ConfigType

[not-null]
The field type.

defaultValue opt : ConfigValue = null

The field default value. If null, ConfigValue.Null will be used.

constraint opt : string = null

The constraint expression or null.

returns → ClassTypeBuilder

this

Adds an optional class field.

ConfigException

If the given class field specification is invalid.

ValidatingException

If one or more validation errors have occurred for the constraint opt expression.

FieldRequired

2 overloads


public method FieldRequired1 → (3)

name in : string

[not-empty]
The field name.

type in : IConfiguratorBase

[not-null]
The field type.

constraint opt : string = null

The constraint expression or null.

returns → ClassTypeBuilder

this

Adds a required class field.

ConfigException

If the given class field specification is invalid.

ValidatingException

If one or more validation errors have occurred for the constraint opt expression.


public method FieldRequired2 → (3)

name in : string

[not-empty]
The field name.

type in : ConfigType

[not-null]
The field type.

constraint opt : string = null

The constraint expression or null.

returns → ClassTypeBuilder

this

Adds a required class field.

ConfigException

If the given class field specification is invalid.

ValidatingException

If one or more validation errors have occurred for the constraint opt expression.

FieldVirtual


public method FieldVirtual → (4)

name in : string

[not-empty]
The field name.

type in : ConfigType

[not-null]
The field type.

value in : FieldDelegate

[not-null]
The field value delegate.

defaultValue opt : ConfigValue = null

Optional default value.

returns → ClassTypeBuilder

this

Adds an external class field.

ConfigException

If the given class field specification is invalid.

SuperClass

2 overloads


public method SuperClass1 → (1)

superClass in : IConfiguratorBase

[not-null]
The super class configurator.

returns → ClassTypeBuilder

this

Specifies the super class for the built class type.

ConfigException

If superClass in is invalid for the type being built.


public method SuperClass2 → (1)

superClass in : ClassType

The super class or null

returns → ClassTypeBuilder

this

Specifies the super class for the built class type.

ConfigException

If superClass in is invalid for the type being built.