Example #1
0
        /// <summary>
        /// 运行某 action
        /// </summary>
        /// <param name="actionName"></param>
        public void runAction(String actionName)
        {
            ControllerRunner.runAction(controller, actionName);

            //MethodInfo method = getMethod( actionName );
            //if (method == null) {
            //    throw new Exception( "action " + wojilu.lang.get( "exNotFound" ) );
            //}

            //ParameterInfo[] parameters = getParameters( method );
            //if (parameters.Length == 1) {
            //    if (parameters[0].ParameterType == typeof( String )) {
            //        method.Invoke( controller, new object[] { HttpUtility.UrlDecode( ctx.route.query ) } );
            //    }
            //    else {
            //        method.Invoke( controller, new object[] { ctx.route.id } );
            //    }
            //}
            //else if (parameters.Length == 0) {
            //    method.Invoke( controller, null );
            //}
            //else {
            //    throw new Exception( "action " + wojilu.lang.get( "exNotFound" ) );
            //}
        }
Example #2
0
 /// <summary>
 /// 运行某 action
 /// </summary>
 /// <param name="actionName"></param>
 public void runAction(String actionName)
 {
     ControllerRunner.runAction(controller, actionName);
 }