public static void SetValue(this IModelNode modelNode, string propertyName, Type propertyType, object value) { if (propertyType == null) { var modelValueInfo = modelNode.GetModelValueInfo(propertyName).Item1; var changedValue = modelValueInfo.ChangedValue(value, modelValueInfo.PropertyType); modelNode.CallMethod(new[] { modelValueInfo.PropertyType }, "SetValue", propertyName, changedValue); } else { modelNode.CallMethod(new[] { propertyType }, "SetValue", propertyName, value); } }
public static object GetValue(this IModelNode modelNode, string propertyName, Type propertyType) { return(modelNode.CallMethod(new[] { propertyType }, "GetValue", propertyName)); }
public static void SetValue(this IModelNode modelNode, string propertyName, Type propertyType, object value) { modelNode.CallMethod(new[] { propertyType }, "SetValue", propertyName, value); }