public static Action asAction(this JsonObject json, FormDialogViewController dvc) { if (json.ContainsKey(Constants.Action)) { string actionName = json[Constants.Action]; return(() => { ControllerAction act; if (json.ContainsKey(Constants.NavigateTo)) { act = new ControllerAction(actionName, json[Constants.NavigateTo]); } else { act = new ControllerAction(actionName); } dvc.Execute(act, null, () => {}); }); } if (json.ContainsKey(Constants.NavigateTo)) { string file = json[Constants.NavigateTo]; return(() => { dvc.NavigateTo(file); }); } return(null); }
public static Action asAction(this JsonObject json, FormDialogViewController dvc){ if (json.ContainsKey(Constants.Action)) { string actionName = json[Constants.Action]; return ()=>{ ControllerAction act; if (json.ContainsKey(Constants.NavigateTo)) act = new ControllerAction(actionName, json[Constants.NavigateTo]); else act = new ControllerAction(actionName); dvc.Execute(act, null, ()=>{}); }; } if (json.ContainsKey(Constants.NavigateTo)) { string file = json[Constants.NavigateTo]; return ()=>{ dvc.NavigateTo(file); }; } return null; }