public bool SetValue(object target, object value) { switch (type) { case TCType.Field: fieldInfo.SetValue(target, value); break; case TCType.Property: propInfo.SetValue(target, value); break; case TCType.List: if (listIndex < 0 || listIndex >= list.Count) { return(false); } list[listIndex] = value; break; case TCType.ContentAccessor: if (!accessor.SetValue(value)) { return(false); } break; default: return(false); } return(control != null?control.SetValue(value) : true); }