IConfigurator

Description

interface Tinman.Core.Config.Binding.IConfigurator<T>

Derived from

IConfiguratorBase

Extended by

ConfiguratorBase abstract
IConfiguratorEnum

Base interface for classes that create objects from config values.

Public / Methods

From​Field


[OwnerReturn]
public method FromField → (2)

config in : ConfigValue

[not-null]
The configuration value.

field in : string

[not-null]
Field name.

returns → T

The created instance.

Creates a new instance from a field of the given configuration value.

ConfigException

If config in resp. field in specify malformed configuration data.

IOException

If a temporary I/O error has occurred; the same call might succeed later.

ValidatingException

If the given config value is invalid (see IValidatable.Validate).

From​Script


[OwnerReturn]
public method FromScript → (2)

script in : ConfigScript

[not-null]
The config script.

name in : string

[not-null]
Name of the entity.

returns → T

The created instance.

Creates a new instance from the given configuration entity.

ConfigException

If script in resp. name in specify malformed configuration data.

IOException

If a temporary I/O error has occurred; the same call might succeed later.

ValidatingException

If the given config value is invalid (see IValidatable.Validate).

From​Value


[OwnerReturn]
public method FromValue → (1)

config in : ConfigValue

[not-null]
The configuration value.

returns → T

The created instance.

Creates a new instance from the given configuration value.

ConfigException

If config in specifies malformed configuration data.

IOException

If a temporary I/O error has occurred; the same call might succeed later.

ValidatingException

If the given config value is invalid (see IValidatable.Validate).

From​Value​Array


[OwnerReturn]
public method FromValueArray → (1)

config in : ConfigValue

[not-null]
The configuration value.

returns → T [ ]

The resulting array or null if config in contains zero elements.

Creates an array of instances from the given configuration value.

ConfigException

If config in specifies malformed configuration data.

IOException

If a temporary I/O error has occurred; the same call might succeed later.

ValidatingException

If the given config value is invalid (see IValidatable.Validate).

From​Value​List


[OwnerReturn]
public method FromValueList → (1)

config in : ConfigValue

[not-null]
The configuration value.

returns → IVector<T>

The resulting array or null if config in contains zero elements.

Creates an array of instances from the given configuration value.

ConfigException

If config in specifies malformed configuration data.

IOException

If a temporary I/O error has occurred; the same call might succeed later.

ValidatingException

If the given config value is invalid (see IValidatable.Validate).

To​Value


public method ToValue → (1)

instance in : T

The object.

returns → ConfigValue

The configuration value.

Returns the configuration value that describes the given object.

The returned value may be of type ConfigType.Invalid, which means that the given object in its current state cannot be described with the configuration API.

ConfigException

If an unexpected error has occurred while building the config value.

To​Value​Array


public method ToValueArray → (1)

instances in : T [ ]

The object.

returns → ConfigValue

The configuration array value.

Returns the configuration value that describes the given objects.

The returned value may be of type ConfigType.Invalid, which means that the given object in its current state cannot be described with the configuration API.

ConfigException

If an unexpected error has occurred while building the config values.

To​Value​Enumerable


public method ToValueEnumerable → (1)

instances in : IEnumerable<T>

The object.

returns → ConfigValue

The configuration array value.

Returns the configuration value that describes the given objects.

The returned value may be of type ConfigType.Invalid, which means that the given object in its current state cannot be described with the configuration API.

ConfigException

If an unexpected error has occurred while building the config values.

To​Value​List


public method ToValueList → (1)

instances in : IVectorConst<T>

The object.

returns → ConfigValue

The configuration array value.

Returns the configuration value that describes the given objects.

The returned value may be of type ConfigType.Invalid, which means that the given object in its current state cannot be described with the configuration API.

ConfigException

If an unexpected error has occurred while building the config values.