ConfigAccessorWriteFieldsFromType Method |
Writes persistent fields into the config files specified by the class annotation.
Namespace:
KSPDev.ConfigUtils
Assembly:
KSPDev_Utils.1.1 (in KSPDev_Utils.1.1.dll) Version: 1.1 for KSP v1.6+
Syntax public static void WriteFieldsFromType(
Type type,
Object instance,
string group = ""
)
Request Example
View SourceParameters
- type
- Type: SystemType
A type to write fields for. - instance
- Type: SystemObject
An instance of type type. If it's null then
only static fields will be written. - group (Optional)
- Type: SystemString
A group to write fields for. If null then all groups that are
defined in the class annotation via PersistentFieldsFileAttribute will be
written.
Remarks Method updates the config file(s) by preserving top level nodes that are not
specified as targets for the requested group.
Note, that fields cannot be writtent into database. Such annotations will be skipped
during the save.
See Also