ConfigAccessorSetValueByPathT Method (ConfigNode, String, T, AbstractOrdinaryValueTypeProto) |
Stores a value of arbitrary type T into a config node.
Namespace:
KSPDev.ConfigUtils
Assembly:
KSPDev_Utils.2.0 (in KSPDev_Utils.2.0.dll) Version: 2.0 for KSP v1.8+
Syntaxpublic static void SetValueByPath<T>(
ConfigNode node,
string path,
T value,
AbstractOrdinaryValueTypeProto typeProto = null
)
Request Example
View SourceParameters
- node
- Type: (Default Namespace)ConfigNode
A node to set data in. - path
- Type: SystemString
A string path to the node. Path components should be separated by '/'
symbol. - value
- Type: T
A value to store. The typeProto handler must know how
to convert the value into string. - typeProto (Optional)
- Type: KSPDev.ConfigUtilsAbstractOrdinaryValueTypeProto
A proto capable to handle the type of value. If not
set then StandardOrdinaryTypesProto is used.
Type Parameters
- T
- The value type to store. Type proto must be able to handle it.
ExceptionsException | Condition |
---|
ArgumentException | If type cannot be handled by the proto. |
See Also