Ejemplo n.º 1
0
            //fullfill the new IFuncParam
            public IFuncParam getParamObje(Dictionary <string, Object> dic)
            {
                IFuncParam newOne = param.clone();

                newOne.FromDictionay(dic);
                return(newOne);
            }
Ejemplo n.º 2
0
 public ActionBean(IAction action, MethodInfo mi)
 {
     this.action = action;
     this.mi     = mi;
     this.actId  = getActionId();
     param       = getFuncParam();
 }
Ejemplo n.º 3
0
        public static Protocol Ctreat(int actId, IFuncParam param)
        {
            Protocol p = new Protocol();

            p.act  = actId;
            p.data = param.ToDictionay();
            return(p);
        }
Ejemplo n.º 4
0
            public void invoke(Protocol proto, NonBlockingConnection conn)
            {
                if (proto.act != this.actId)
                {
                    return;
                }
                if (proto.data == null)
                {
                    return;
                }

                ConsoleEx.DebugLog("Receive Protocol :: " + proto.ToString());

                IFuncParam newParam = getParamObje(proto.data);

                try{
                    mi.Invoke(action, new Object[] { newParam, conn });
                } catch (Exception e) {
                    ConsoleEx.DebugLog(e.ToString());
                }
            }