예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
 public bool SetValue(ValueAccessorContext context, string propertyName, object value)
 {
     context.BackingPropertySetter(value);
     return(value != null);
 }
예제 #4
0
 public object GetValue(ValueAccessorContext context, string propertyName)
 {
     return(context.BackingPropertyGetter() ?? DefaultValue);
 }
예제 #5
0
        public object GetValue(ValueAccessorContext context, string propertyName)
        {
            ContentItem item = (ContentItem)context.Instance;

            return(item.GetDetail(propertyName));
        }
예제 #6
0
 public bool SetValue(ValueAccessorContext context, string propertyName, object value)
 {
     context.Instance.SetChildren(ZoneName ?? Name ?? propertyName, value as IEnumerable);
     return(value != null);
 }
예제 #7
0
 public object GetValue(ValueAccessorContext context, string propertyName)
 {
     return(context.Instance.GetChildren(ZoneName ?? Name ?? propertyName)
            .ConvertTo(context.Property.PropertyType, propertyName));
 }
예제 #8
0
 public object GetValue(ValueAccessorContext context, string propertyName)
 {
     return(context.Instance.GetChild(DefaultChildName ?? propertyName));
 }