public static NSAction a(this JsonObject json, JsonDialogViewController dvc) { if (json != null && json.ContainsKey("navigateto") && json.ContainsKey("action")) { string file = json["navigateto"]; string action = json["action"]; return(() => { dvc.InvokeAction(action, new object[] { file }); }); } if (json.ContainsKey("navigateto")) { string file = json["navigateto"]; return(() => { dvc.NavigateTo(file); }); } if (json.ContainsKey("action")) { return(() => { dvc.InvokeAction(json["action"], new Element("adf")); }); } return(null); }
public static NSAction a(this JsonObject json, JsonDialogViewController dvc){ if (json!=null && json.ContainsKey("navigateto") && json.ContainsKey("action")) { string file = json["navigateto"]; string action = json["action"]; return ()=>{ dvc.InvokeAction(action, new object[]{file}); }; } if (json.ContainsKey("navigateto")) { string file = json["navigateto"]; return ()=>{ dvc.NavigateTo(file); }; } if (json.ContainsKey("action")) { return ()=>{ dvc.InvokeAction(json["action"], new Element("adf")); }; } return null; }
public JsonBindingContext(JsonDialogViewController callbacks, JsonValue json, JsonValue data, string title) { _controller = callbacks; _elements = new List<Element>(); if (json == null) throw new ArgumentNullException ("json"); Root = new RootElement(title); try { Populate (json, Root, data); } catch (Exception e) { Console.WriteLine("Exception on JsonBindingContext " + e.ToString()); } }
public JsonBindingContext(JsonDialogViewController callbacks, JsonValue json, JsonValue data, string title) { _controller = callbacks; _elements = new List <Element>(); if (json == null) { throw new ArgumentNullException("json"); } Root = new RootElement(title); try { Populate(json, Root, data); } catch (Exception e) { Console.WriteLine("Exception on JsonBindingContext " + e.ToString()); } }