ConfiguratorBase

Description

abstract class Tinman.Core.Config.Binding.ConfiguratorBase<T>

Derived from

IConfigurator<T>

Extended by

ConfiguratorEnum sealed
ConfiguratorObject abstract

Abstract base class for IConfigurator implementations.

Protected / Methods

Do​From​Value


[OwnerReturn]
protected virtual method DoFromValue → (1)

config in : ConfigValue

The config value (will never be null or ConfigValue.IsNull).

returns → T

The configured native value.

Configures a native value from the given config value.

If the implementing method does not know how to configure a native object from config in, it can try to delegate to a more specific configurator by calling the base implementation.

This default implementation always throws a ConfigException.

The default implementation of ConfiguratorObject delegates the process of configuring a native object from config in to a more specific configurator, defined by a derived type of IConfiguratorBase.Type.

ConfigException

If no configurator object has been found for the type of config in or if config in specifies malformed configuration data.

ValidatingException

If config in is invalid (IValidatable.Validate).

IOException

If an unexpected I/O error has occurred while creating the native value.

From​Null


[EmptyBody]
protected virtual method FromNull → ()

returns → T

The created instance or null.

Configures a native value for a ConfigValue.IsNull value.