public static void DeserializeFromNode(this object obj, ConfigNode node)
        {
            obj.ThrowIfNullArgument(nameof(obj));
            node.ThrowIfNullArgument(nameof(node));

            NodeDataList     list    = NodeDataListLibrary.Get(obj.GetType());
            OperationContext context = new OperationContext(Operation.Deserialize, obj);

            list.Load(node, context);
        }
        public static ConfigNode SerializeToNode(this object obj)
        {
            obj.ThrowIfNullArgument(nameof(obj));

            ConfigNode node = new ConfigNode(SERIALIZED_NODE);

            NodeDataList     list    = NodeDataListLibrary.Get(obj.GetType());
            OperationContext context = new OperationContext(Operation.Serialize, obj);

            list.Save(node, context);

            return(node);
        }
        public static OperationContext SaveFields(this object obj, ConfigNode node, OperationContext context)
        {
            obj.ThrowIfNullArgument(nameof(obj));
            node.ThrowIfNullArgument(nameof(node));
            context.ThrowIfNullArgument(nameof(context));

            NodeDataList list = NodeDataListLibrary.Get(obj.GetType());

            OperationContext newContext = new OperationContext(context, obj);

            list.Save(node, newContext);
            return(newContext);
        }