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[] pathKeys,
T value,
AbstractOrdinaryValueTypeProto typeProto = null
)
Request Example
View SourceParameters
- node
- Type: (Default Namespace)ConfigNode
A node to set data in. - pathKeys
- Type: SystemString
An array of values that makes the full path. First node in the array is
the top most component of the path. - value
- Type: T
A value to store. The typeProto handler must know how
to convert value's type 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