Execute() 공개 메소드

public Execute ( ControllerAction action, Element el, System.Action completed ) : void
action ControllerAction
el MonoTouch.Dialog.Element
completed System.Action
리턴 void
예제 #1
0
        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;
		}