18 using erminas.SmartAPI.CMS.Project;
19 using erminas.SmartAPI.CMS.Project.ContentClasses.Elements;
20 using erminas.SmartAPI.Exceptions;
22 namespace erminas.SmartAPI.CMS.Converter
24 internal class ContentClassElementConverter : AbstractGuidElementConverter<IContentClassElement>
27 RedDotAttribute attribute, Guid guid)
34 var parentCcElement = (IContentClassElement) parent;
36 IContentClassElement result;
37 return parentCcElement.ContentClass.Elements.TryGetByGuid(guid, out result) ? result : null;
40 protected override IContentClassElement GetFromName(
IProjectObject parent, IXmlReadWriteWrapper element,
41 RedDotAttribute attribute, IContentClassElement value)
43 return ConverterHelper.GetEquivalentContentClassElementFromOtherProject(value, parent.
Project);