public void unreg_channel(Ichannel ch) { lock (remove_event) { remove_event.Add(ch); } }
public void process_event(Ichannel _ch, ArrayList _event) { current_ch = _ch; try { String func_name = (String)_event[1]; if (events.ContainsKey(func_name)) { on_event method = events[func_name]; try { method((ArrayList)_event[2]); current_ch = null; } catch (Exception e) { throw new juggle.Exception(string.Format("function name:{0} System.Exception:{1}", func_name, e)); } } else { throw new juggle.Exception(string.Format("do not have a function named::{0}", func_name)); } } catch (Exception e) { throw new juggle.Exception(string.Format("System.Exception:{0}", e)); } }
public void reg_channel(Ichannel ch) { lock (add_event) { add_event.Add(ch); } }
public void process_event(Ichannel _ch, ArrayList _event) { current_ch = _ch; String func_name = (String)_event[1]; Type type = GetType(); MethodInfo method = type.GetMethod(func_name); if (method != null) { if (_event.Count > 2) { object[] argv = new object[1]; argv[0] = (ArrayList)_event[2]; method.Invoke(this, argv); } else { method.Invoke(this, null); } current_ch = null; } else { Console.WriteLine("do not have a function named:" + func_name); } }
public void process_event(Ichannel _ch, ArrayList _event) { current_ch = _ch; try { String func_name = (String)_event[1]; Type type = GetType(); MethodInfo method = type.GetMethod(func_name); if (method != null) { try { object[] argv = new object[1]; if (_event.Count > 2) { argv[0] = (ArrayList)_event[2]; } method.Invoke(this, argv); current_ch = null; } catch (Exception e) { throw new juggle.Exception(string.Format("function name:{0} System.Exception:{1}", func_name, e)); } } else { throw new juggle.Exception(string.Format("do not have a function named::{0}", func_name)); } } catch (Exception e) { throw new juggle.Exception(string.Format("System.Exception:{0}", e)); } }
public Icaller(Ichannel _ch) { ch = _ch; }
public void unreg_channel(Ichannel ch) { event_set.Remove(ch); }
public void reg_channel(Ichannel ch) { event_set.Add(ch); }