public bool SetValue(ValueAccessorContext context, string propertyName, object value) { ContentItem item = (ContentItem)context.Instance; if (value != null) { item.SetDetail(propertyName, value, value.GetType()); } return(value != null); }
public bool SetValue(ValueAccessorContext context, string propertyName, object value) { var item = context.Instance; var existing = item.GetChild(DefaultChildName ?? propertyName); if (existing == null && value != null) { item.SetChild(DefaultChildName ?? propertyName, value); if (!string.IsNullOrEmpty(DefaultChildZoneName)) { ((ContentItem)value).ZoneName = DefaultChildZoneName; } return(true); } return(false); }
public bool SetValue(ValueAccessorContext context, string propertyName, object value) { context.BackingPropertySetter(value); return(value != null); }
public object GetValue(ValueAccessorContext context, string propertyName) { return(context.BackingPropertyGetter() ?? DefaultValue); }
public object GetValue(ValueAccessorContext context, string propertyName) { ContentItem item = (ContentItem)context.Instance; return(item.GetDetail(propertyName)); }
public bool SetValue(ValueAccessorContext context, string propertyName, object value) { context.Instance.SetChildren(ZoneName ?? Name ?? propertyName, value as IEnumerable); return(value != null); }
public object GetValue(ValueAccessorContext context, string propertyName) { return(context.Instance.GetChildren(ZoneName ?? Name ?? propertyName) .ConvertTo(context.Property.PropertyType, propertyName)); }
public object GetValue(ValueAccessorContext context, string propertyName) { return(context.Instance.GetChild(DefaultChildName ?? propertyName)); }