public bool Save(object fieldValue, ConfigNode node, OperationContext context) { node.ThrowIfNullArgument(nameof(node)); fieldValue.EnsureArgumentType(listType, nameof(fieldValue)); IList list = (IList)fieldValue; if (list.IsNullOrEmpty()) { return(false); } foreach (object value in list) { if (value.IsNull()) { continue; } string formattedValue = parser.Format(value); if (formattedValue.IsNotNull()) { node.AddValue(name, formattedValue); } } return(true); }
public bool Save(object fieldValue, ConfigNode node, OperationContext context) { node.ThrowIfNullArgument(nameof(node)); if (fieldValue.IsNull()) { return(false); } string value = parser.Format(fieldValue); if (value.IsNull()) { return(false); } node.SetValue(name, value, true); return(true); }