Base interface for classes that create objects from config values.
interface
|
IConfigurator
|
with
|
<T>
|
||
extends
|
IConfiguratorBase
|
||||
base of
|
ConfiguratorBase
|
||||
IConfiguratorEnum
|
Returns the configuration type of this configurator.
property
|
Type
{
get
}
|
||
type
|
ConfigType
|
||
value
|
|
The configuration type. | |
inherited
|
IConfiguratorBase.Type
|
Creates a new instance from a field of the given configuration value.
[OwnerReturn]
|
||||
method
|
FromField
(ConfigValue config,
string field)
|
|||
type
|
T
|
|||
params
|
config
|
[not-null]
|
The configuration value. | |
field
|
[not-null]
|
Field name. | ||
returns
|
|
The created instance. |
Creates a new instance from the given configuration entity.
[OwnerReturn]
|
||||
method
|
FromScript
(ConfigScript script,
string name)
|
|||
type
|
T
|
|||
params
|
script
|
[not-null]
|
The config script. | |
name
|
[not-null]
|
Name of the entity. | ||
returns
|
|
The created instance. |
Creates a new instance from the given configuration value.
[OwnerReturn]
|
||||
method
|
FromValue
(ConfigValue config)
|
|||
type
|
T
|
|||
params
|
config
|
[not-null]
|
The configuration value. | |
returns
|
|
The created instance. |
Creates an array of instances from the given configuration value.
[OwnerReturn]
|
||||
method
|
FromValueArray
(ConfigValue config)
|
|||
type
|
T[]
|
|||
params
|
config
|
[not-null]
|
The configuration value. | |
returns
|
The
resulting
array
or
null
if
config
contains
zero
elements.
|
Creates an array of instances from the given configuration value.
[OwnerReturn]
|
||||
method
|
FromValueList
(ConfigValue config)
|
|||
type
|
IVector<T>
|
|||
params
|
config
|
[not-null]
|
The configuration value. | |
returns
|
The
resulting
array
or
null
if
config
contains
zero
elements.
|
This is a no-op method that forces the compiler / linker to include this type in the resulting binary.
method
|
PleaseIncludeInBinaryThanks
()
|
||
inherited
|
IPleaseIncludeInBinaryThanks.PleaseIncludeInBinaryThanks
|
Remarks:
Calling this stub method makes sure that all lazy constructor calls have been made.
To initialize everything, an application needs to call this method on its root module(s) (see TinmanModule), followed by a call to PleaseIncludeInBinaryThanksAll.
Returns the configuration value that describes the given object.
method
|
ToValue
(T instance)
|
||
type
|
ConfigValue
|
||
params
|
instance
|
The object. | |
returns
|
|
The configuration value. |
Remarks:
The returned value may be of type Invalid, which means that the given object in its current state cannot be described with the configuration API.
Returns the configuration value that describes the given objects.
method
|
ToValueArray
(T[] instances)
|
||
type
|
ConfigValue
|
||
params
|
instances
|
The object. | |
returns
|
|
The configuration array value. |
Remarks:
The returned value may be of type Invalid, which means that the given object in its current state cannot be described with the configuration API.
Returns the configuration value that describes the given objects.
method
|
ToValueList
(IVectorConst<T> instances)
|
||
type
|
ConfigValue
|
||
params
|
instances
|
The object. | |
returns
|
|
The configuration array value. |
Remarks:
The returned value may be of type Invalid, which means that the given object in its current state cannot be described with the configuration API.