Obtains the textual array value of this entry
Obtains the flag value of this entry
Returns the type of the entry's value
Obtains the numeric value of this entry
Obtains the value of this configuration entry dependant on the requested casting type and matching that to the supported types of the configuration entry
Obtains the text value of this entry
Creates a new configuration entry containing a textual array
Creates a new configuration entry containing a flag
Creates a new configuration entry containing an integer
Creates a new configuration entry containing text
Tests out using the configuration entry and its various operator overloads
ConfigEntry entry = ConfigEntry.ofArray(["hello", "world"]); assert(entry[] == ["hello", "world"]); entry = ConfigEntry.ofNumeric(1); assert(entry.numeric() == 1); entry = ConfigEntry.ofText("hello"); assert(cast(string)entry == "hello"); entry = ConfigEntry.ofFlag(true); assert(entry);
Tests out the erroneous usage of a configuration entry
ConfigEntry entry = ConfigEntry.ofText("hello"); try { entry[]; assert(false); } catch(ConfigException e) { }
Tests out the erroneous usage of a configuration entry
ConfigEntry entry; try { entry[]; assert(false); } catch(ConfigException e) { }
A configuration entry which acts as a typed union and supports certain fixed types