/// <summary> /// Takes CMS data and writes it to the property /// </summary> /// <param name="mappingContext">The mapping context.</param> public virtual void MapCmsToProperty(AbstractDataMappingContext mappingContext) { var result = MapToProperty(mappingContext); if (result != null) Configuration.PropertySetter(mappingContext.Object, result); }
/// <summary> /// Takes a Property value and writes it to a CMS value /// </summary> /// <param name="mappingContext">The mapping context.</param> public virtual void MapPropertyToCms(AbstractDataMappingContext mappingContext) { if (ReadOnly) return; mappingContext.PropertyValue = Configuration.PropertyGetter(mappingContext.Object); MapToCms(mappingContext); }
/// <summary> /// Takes CMS data and writes it to the property /// </summary> /// <param name="mappingContext">The mapping context.</param> public virtual void MapCmsToProperty(AbstractDataMappingContext mappingContext) { using (new Monitor()) { object result; try { result = MapToProperty(mappingContext); } catch (MapperStackException) { throw; } catch (Exception ex) { throw new MapperException( "Failed to map to property '{0}' on type '{1}'".Formatted(Configuration.PropertyInfo.Name, Configuration.PropertyInfo.ReflectedType.FullName), ex); } if (result != null) { Configuration.PropertySetter(mappingContext.Object, result); } } }
/// <summary> /// Takes a Property value and writes it to a CMS value /// </summary> /// <param name="mappingContext">The mapping context.</param> public void MapPropertyToCms(AbstractDataMappingContext mappingContext) { if (ReadOnly) return; //TODO: see if this can be sped up, I suspect dynamic IL would be quicker mappingContext.PropertyValue = Configuration.PropertyInfo.GetValue(mappingContext.Object, null); MapToCms(mappingContext); }
/// <summary> /// Takes CMS data and writes it to the property /// </summary> /// <param name="mappingContext">The mapping context.</param> public void MapCmsToProperty(AbstractDataMappingContext mappingContext) { var result = MapToProperty(mappingContext); //TODO: see if this can be sped up, I suspect dynamic IL would be quicker if (result != null) Configuration.PropertyInfo.SetValue(mappingContext.Object, result, null); }
/// <summary> /// Takes CMS data and writes it to the property /// </summary> /// <param name="mappingContext">The mapping context.</param> public virtual void MapCmsToProperty(AbstractDataMappingContext mappingContext) { var result = MapToProperty(mappingContext); if (result != null) { Configuration.PropertySetter(mappingContext.Object, result); } }
/// <summary> /// Takes a Property value and writes it to a CMS value /// </summary> /// <param name="mappingContext">The mapping context.</param> public virtual void MapPropertyToCms(AbstractDataMappingContext mappingContext) { if (ReadOnly) { return; } mappingContext.PropertyValue = Configuration.PropertyGetter(mappingContext.Object); MapToCms(mappingContext); }
/// <summary> /// Takes CMS data and writes it to the property /// </summary> /// <param name="mappingContext">The mapping context.</param> public void MapCmsToProperty(AbstractDataMappingContext mappingContext) { var result = MapToProperty(mappingContext); //TODO: see if this can be sped up, I suspect dynamic IL would be quicker if (result != null) { Configuration.PropertyInfo.SetValue(mappingContext.Object, result, null); } }
/// <summary> /// Takes a Property value and writes it to a CMS value /// </summary> /// <param name="mappingContext">The mapping context.</param> public void MapPropertyToCms(AbstractDataMappingContext mappingContext) { if (ReadOnly) { return; } //TODO: see if this can be sped up, I suspect dynamic IL would be quicker mappingContext.PropertyValue = Configuration.PropertyInfo.GetValue(mappingContext.Object, null); MapToCms(mappingContext); }
/// <summary> /// Takes a Property value and writes it to a CMS value /// </summary> /// <param name="mappingContext">The mapping context.</param> public virtual void MapPropertyToCms(AbstractDataMappingContext mappingContext) { if (ReadOnly) return; try { mappingContext.PropertyValue = Configuration.PropertyGetter(mappingContext.Object); } catch (Exception ex) { throw new MapperException("Failed to map to CMS '{0}' on type '{1}'".Formatted(Configuration.PropertyInfo.Name, Configuration.PropertyInfo.ReflectedType.FullName), ex); } MapToCms(mappingContext); }
/// <summary> /// Takes CMS data and writes it to the property /// </summary> /// <param name="mappingContext">The mapping context.</param> public virtual void MapCmsToProperty(AbstractDataMappingContext mappingContext) { object result; try { result = MapToProperty(mappingContext); } catch (Exception ex) { throw new MapperException("Failed to map to property '{0}' on type '{1}'".Formatted(Configuration.PropertyInfo.Name, Configuration.PropertyInfo.ReflectedType.FullName), ex); } if (result != null) Configuration.PropertySetter(mappingContext.Object, result); }
/// <summary> /// Takes a Property value and writes it to a CMS value /// </summary> /// <param name="mappingContext">The mapping context.</param> public virtual void MapPropertyToCms(AbstractDataMappingContext mappingContext) { if (ReadOnly) { return; } try { mappingContext.PropertyValue = Configuration.PropertyGetter(mappingContext.Object); } catch (Exception ex) { throw new MapperException("Failed to map to CMS '{0}' on type '{1}'".Formatted(Configuration.PropertyInfo.Name, Configuration.PropertyInfo.ReflectedType.FullName), ex); } MapToCms(mappingContext); }
/// <summary> /// Maps data from the CMS value to the .Net property value /// </summary> /// <param name="mappingContext">The mapping context.</param> /// <returns>System.Object.</returns> public abstract object MapToProperty(AbstractDataMappingContext mappingContext);
/// <summary> /// Maps data from the .Net property value to the CMS value /// </summary> /// <param name="mappingContext">The mapping context.</param> /// <returns>The value to write</returns> public abstract void MapToCms(AbstractDataMappingContext mappingContext);
/// <summary> /// Maps data from the CMS value to the .Net property value /// </summary> /// <param name="mappingContext">The mapping context.</param> /// <returns>System.Object.</returns> public abstract object MapToProperty(AbstractDataMappingContext mappingContext);
/// <summary> /// Maps data from the .Net property value to the CMS value /// </summary> /// <param name="mappingContext">The mapping context.</param> /// <returns>The value to write</returns> public abstract void MapToCms(AbstractDataMappingContext mappingContext);