public static string GenBindCodeReactiveMemberProperty(JObject jo_member, JObject jo_view) { string member_name = jo_member ["Name"].Value <string> (); StringBuilder result = new StringBuilder(); if (jo_view ["Members"] [member_name] ["Bind"] ["Changed"].Value <bool> ()) { result.AppendFormat(@" VM.RP_{0}.Subscribe (OnChanged_{0}).AddTo (baseBindDisposables);" , member_name); } if (ElementViewTools.GetBindPropertyValue(jo_view ["Members"] [member_name] ["Bind"] as JObject, "PairChanged")) { result.AppendFormat(@" VM.RP_{0}.Pairwise ().Subscribe (OnPairChanged_{0}).AddTo (baseBindDisposables);" , member_name); } return(result.ToString()); }
public static string GenFuncCodeReactiveMemberProperty(JObject jo_member, JObject jo_view) { string member_name = jo_member ["Name"].Value <string> (); string member_type = jo_member ["Type"].Value <string> (); StringBuilder result = new StringBuilder(); if (jo_view ["Members"] [member_name] ["Bind"] ["Changed"].Value <bool> ()) { result.AppendFormat(@" public virtual void OnChanged_{0} ({1} value) {{ }}" , member_name, member_type); } if (ElementViewTools.GetBindPropertyValue(jo_view ["Members"] [member_name] ["Bind"] as JObject, "PairChanged")) { result.AppendFormat(@" public virtual void OnPairChanged_{0} (Pair<{1}> pair) {{ }}" , member_name, member_type); } return(result.ToString()); }