ConfigValue
Description
- Derived from
-
IVersioned
ICodeOutput
IEquatable<ConfigValue>
IValidatable
ICodeRange
Abstract base class for ConfigValue implementations.
Public / Constants
ContextIncludeVirtualFields
When using ToString1, this context value will be set via Context.Set2 when generating source code.
False
The boolean value false
.
This config value is immutable. Modifying its value will produce undefined behaviour.
- See also
Invalid
An invalid value.
This config value is immutable. Modifying its value will produce undefined behaviour.
- See also
Nan
The number value NaN
.
This config value is immutable. Modifying its value will produce undefined behaviour.
- See also
Null
The null
value for ClassType values.
This config value is immutable. Modifying its value will produce undefined behaviour.
- See also
One
The number value 1
.
This config value is immutable. Modifying its value will produce undefined behaviour.
- See also
True
The boolean value true
.
This config value is immutable. Modifying its value will produce undefined behaviour.
- See also
Public / Constructors
Evaluate
Parses the given config expression and returns the resulting config value.
- ValidatingException
-
If the given expression in source code is malformed.
- ConfigException
-
If an error has occurred while evaluating the expression (e.g. identifier not found).
- See also
New
4 overloads
Creates a new ConfigType.Bool config value object for the given value.
Creates a new ConfigType.Num config value object for the given value.
Creates a new ConfigType.Path config value object for the given value.
Creates a new ConfigType.Str config value object for the given value.
NewArray
4 overloads
Creates a new ConfigType.Path config value array for the given values.
Creates a new ConfigType.Path config value array for the given values.
Creates a new ConfigType.Path config value array for the given values.
Creates a new ConfigType.Path config value array for the given values.
Public / Methods
Cache
Caches the given object.
This method can be called after a config value has been constructed for a native object.
Configure
Uses this config value and creates a native object from it.
A IConfiguratorObject instance must have been specified for the ClassType of this value (see ClassTypeBuilder.Configurator).
- ConfigException
-
If this config value 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).
GetField
Returns the value of the given field.
- ConfigException
-
If name in is invalid or if the field violates the required nullability.
- See also
GetFieldBool
Returns the value of the given field.
- ConfigException
-
If name in is invalid or if the field has an inconvertible type.
- See also
GetFieldDouble
Returns the value of the given field.
- ConfigException
-
If name in is invalid or if the field has an inconvertible type.
- See also
GetFieldInt
Returns the value of the given field.
- ConfigException
-
If name in is invalid or if the field has an inconvertible type.
- See also
GetFieldPath
Returns the value of the given field.
- ConfigException
-
If name in is invalid or if the field has an inconvertible type.
- See also
GetFieldStr
Returns the value of the given field.
- ConfigException
-
If name in is invalid, if the field has an inconvertible type or if the field violates the required nullability.
- See also
New
2 overloads
Creates a new instance of this nullable type and sets this value to the resulting value.
- See also
Creates a new instance of the given nullable type and sets this value to the resulting value.
- ConfigException
-
If the given type in cannot be instantiated or cannot be assigned to the base type of this config value.
- See also
Set
Sets the value to the given value.
- ConfigException
-
If value in is not convertible to the type of this config value.
- See also
SetField
4 overloads
Sets the value of the given field.
- ConfigException
-
If name in is invalid or if value in is not convertible to the type of this config value.
Sets the value of the given field, by calling IConfigurable.ToConfig on value in (if not null
) and then delegating to SetField1.
If value in is null
, the field will be set to Null.
- ConfigException
-
If name in is invalid or if value in is not convertible to the type of this config value.
Sets the value of the given field, by calling IConfigurableTrait.ToConfig on value in and then delegating to SetField1.
- ConfigException
-
If name in is invalid or if value in is not convertible to the type of this config value.
Sets the value of the given field, by calling IConfigurator.ToValue on configurator in passing value in and then delegating to SetField1.
- ConfigException
-
If name in is invalid or if value in is not convertible to the type of this config value.
SetFieldBool
Sets the value of the given field.
- ConfigException
-
If name in is invalid or if value in is not convertible to the type of this config value.
SetFieldNum
3 overloads
Sets the value of the given field.
- ConfigException
-
If name in is invalid or if value in is not convertible to the type of this config value.
Sets the value of the given field.
- ConfigException
-
If name in is invalid or if value in is not convertible to the type of this config value.
Sets the value of the given field.
- ConfigException
-
If name in is invalid or if value in is not convertible to the type of this config value.
SetFieldPath
Sets the value of the given field.
- ConfigException
-
If name in is invalid or if value in is not convertible to the type of this config value.
SetFieldStr
Sets the value of the given field.
- ConfigException
-
If name in is invalid or if value in is not convertible to the type of this config value.
Public / Attributes
Bool
Accesses the config value, assuming a conversion to ConfigType.Bool exists.
- ConfigException
-
If no conversion to ConfigType.Bool exists.
Elements
Accesses the config value, assuming it is an array value.
- ConfigException
-
If this is not an array value.
- See also
Fields
Accesses the config value, assuming it is a class value.
- ConfigException
-
If this is not a class value.
- See also
Num
Accesses the config value, assuming a conversion to ConfigType.Num exists.
- ConfigException
-
If no conversion to ConfigType.Num exists.
Path
Accesses the config value, assuming a conversion to ConfigType.Path exists.
- ConfigException
-
If no conversion to ConfigType.Path exists.
Str
Accesses the config value, assuming a conversion to ConfigType.Str exists.
- ConfigException
-
If no conversion to ConfigType.Str exists.
Protected / Methods
DoEquals
Compares this config value and the given one for equality.
- ConfigException
-
If an unexpected error has occurred.
DoValidate
Validates this config value.
- ConfigException
-
If this config value specifies malformed configuration data.
ThrowIfImmutable
Asserts that this config value is mutable.
- ConfigException
-
If IsImmutable returns
true
.
- See also
Protected / Attributes
DoSyntaxWeightCtor
Returns the syntax weight for this config value (for pretty-print only).
- ConfigException
-
If an unexpected error has occurred.