Click or drag to resize

ConfigAccessorSetValueByPathT Method (ConfigNode, String, T, AbstractOrdinaryValueTypeProto)

Stores a value of arbitrary type T into a config node.

Namespace:  KSPDev.ConfigUtils
Assembly:  KSPDev_Utils.1.1 (in KSPDev_Utils.1.1.dll) Version: 1.1 for KSP v1.6+
Syntax
C#
public static void SetValueByPath<T>(
	ConfigNode node,
	string path,
	T value,
	AbstractOrdinaryValueTypeProto typeProto = null
)
Request Example View Source

Parameters

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.
Exceptions
ExceptionCondition
ArgumentExceptionIf type cannot be handled by the proto.
See Also