16 using System.Globalization;
18 using erminas.SmartAPI.CMS.Project;
19 using erminas.SmartAPI.CMS.Project.ContentClasses.Elements;
20 using erminas.SmartAPI.Utils;
22 namespace erminas.SmartAPI.CMS.Converter
24 internal class EditorSettingsConverter : IAttributeConverter<EditorSettings>
28 ConverterHelper.EnsureValidProjectObject(parent);
30 if (!element.IsAttributeSet(parent, attribute.ElementName))
35 var intValue = element.GetIntAttributeValue(attribute.ElementName);
39 public bool IsReadOnly
44 public void WriteTo(
IProjectObject parent, IXmlReadWriteWrapper element, RedDotAttribute attribute,
47 ConverterHelper.EnsureValidProjectObject(parent);
51 : ((int) value).ToString(CultureInfo.InvariantCulture);
53 element.SetAttributeValue(attribute.ElementName, attributeValue);