16 using System.Globalization;
18 using erminas.SmartAPI.CMS.Project;
19 using erminas.SmartAPI.CMS.Project.ContentClasses.Elements;
20 using erminas.SmartAPI.Exceptions;
21 using erminas.SmartAPI.Utils;
23 namespace erminas.SmartAPI.CMS.Converter
25 internal class InfoElementConverter : IAttributeConverter<IInfoAttribute>
29 if (!element.IsAttributeSet(parent, attribute.ElementName))
35 var
id = element.GetIntAttributeValue(attribute.ElementName).Value;
40 public bool IsReadOnly {
get;
set; }
42 public void WriteTo(
IProjectObject parent, IXmlReadWriteWrapper element, RedDotAttribute attribute,
52 element.SetAttributeValue(attribute.ElementName, null);
56 element.SetAttributeValue(attribute.ElementName, value.
Id.ToString(CultureInfo.InvariantCulture));