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.Set1 when generating source code.
False
The boolean value false
.
This config value is immutable. Modifying its value will produce undefined behaviour.
Invalid
An invalid value.
This config value is immutable. Modifying its value will produce undefined behaviour.
Null
The null
value for ClassType values.
This config value is immutable. Modifying its value will produce undefined behaviour.
One
The number value 1
.
This config value is immutable. Modifying its value will produce undefined behaviour.
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).
New
4 overloads
Creates a new ConfigType.Bool config value object for the the given value.
Creates a new ConfigType.Num config value object for the the given value.
Creates a new ConfigType.Path config value object for the the given value.
Creates a new ConfigType.Str config value object for the the given value.
NewArray
4 overloads
Creates a new ConfigType.Path config value array for the the given values.
Creates a new ConfigType.Path config value array for the the given values.
Creates a new ConfigType.Path config value array for the the given values.
Creates a new ConfigType.Path config value array for the 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.
An 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 nullabililty.
- 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 nullabililty.
- See also
New
2 overloads
Creates a new instance of this nullable type and sets this value to the resulting value.
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.
Set
Sets the value to the given value.
- ConfigException
-
If value in is not convertible to the type of this config value.
SetField
2 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.
- See also
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.
- See also
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.
- See also
SetFieldNum
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.
- See also
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.
- See also
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.
- See also
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.
Protected / Attributes
DoSyntaxWeightCtor
Returns the syntax weight for this config value (for pretty-print only).
- ConfigException
-
If an unexpected error has occurred.