public void RegisterRetCallback(String cmdname, RetCallbackType func, Type vartype, Type rettype, String desc) { CallbackItem cb; String vartypename = "null"; String cmd = cmdname; if (vartype != null) { vartypename = vartype.ToString(); cmd += "|" + vartypename; } if (CallbackDB.ContainsKey(cmdname)) { cb = CallbackDB[cmd]; } else { cb = new CallbackItem(); cb.name = cmdname; cb.type = vartypename; cb.description = desc; CallbackDB[cmd] = cb; } cb.RetCallback += new RetCallbackType(func); cb.retType = rettype.ToString(); cb.Callback = null; }
public void RegisterRetCallback(String cmdname, RetCallbackType func, Type vartype, Type rettype, String desc) { CallbackItem cb; String vartypename = "null"; String cmd = cmdname; if (vartype != null) { vartypename = vartype.ToString(); cmd += "|" + vartypename; } if (CallbackDB.ContainsKey(cmdname)) { cb = CallbackDB[cmd]; } else { cb = new CallbackItem(); cb.name = cmdname; cb.type = vartypename; cb.description = desc; CallbackDB[cmd] = cb; } cb.RetCallback += new RetCallbackType(func); cb.retType = rettype.ToString(); cb.Callback = null; }