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

FromField


[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).

FromScript


[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).

FromValue


[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).

FromValueArray


[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).

FromValueList


[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).

ToValue


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.

ToValueArray


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.

ToValueEnumerable


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.

ToValueList


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.