//fullfill the new IFuncParam public IFuncParam getParamObje(Dictionary <string, Object> dic) { IFuncParam newOne = param.clone(); newOne.FromDictionay(dic); return(newOne); }
public ActionBean(IAction action, MethodInfo mi) { this.action = action; this.mi = mi; this.actId = getActionId(); param = getFuncParam(); }
public static Protocol Ctreat(int actId, IFuncParam param) { Protocol p = new Protocol(); p.act = actId; p.data = param.ToDictionay(); return(p); }
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()); } }