Ejemplo n.º 1
0
 public void unreg_channel(Ichannel ch)
 {
     lock (remove_event)
     {
         remove_event.Add(ch);
     }
 }
Ejemplo n.º 2
0
        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));
            }
        }
Ejemplo n.º 3
0
 public void reg_channel(Ichannel ch)
 {
     lock (add_event)
     {
         add_event.Add(ch);
     }
 }
Ejemplo n.º 4
0
        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);
            }
        }
Ejemplo n.º 5
0
        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);
            }
        }
Ejemplo n.º 6
0
        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));
            }
        }
Ejemplo n.º 7
0
 public Icaller(Ichannel _ch)
 {
     ch = _ch;
 }
Ejemplo n.º 8
0
 public Icaller(Ichannel _ch)
 {
     ch = _ch;
 }
Ejemplo n.º 9
0
 public void unreg_channel(Ichannel ch)
 {
     event_set.Remove(ch);
 }
Ejemplo n.º 10
0
 public void reg_channel(Ichannel ch)
 {
     event_set.Add(ch);
 }
Ejemplo n.º 11
0
 public void unreg_channel(Ichannel ch)
 {
     event_set.Remove(ch);
 }
Ejemplo n.º 12
0
 public void reg_channel(Ichannel ch)
 {
     event_set.Add(ch);
 }