예제 #1
0
 public void unreg_channel(Ichannel ch)
 {
     lock (remove_event)
     {
         remove_event.Add(ch);
     }
 }
예제 #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));
            }
        }
예제 #3
0
 public void reg_channel(Ichannel ch)
 {
     lock (add_event)
     {
         add_event.Add(ch);
     }
 }
예제 #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);
            }
        }
예제 #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);
            }
        }
예제 #6
0
파일: Imodule.cs 프로젝트: qdsloop/juggle
        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));
            }
        }
예제 #7
0
파일: Icaller.cs 프로젝트: qdsloop/juggle
 public Icaller(Ichannel _ch)
 {
     ch = _ch;
 }
예제 #8
0
 public Icaller(Ichannel _ch)
 {
     ch = _ch;
 }
예제 #9
0
 public void unreg_channel(Ichannel ch)
 {
     event_set.Remove(ch);
 }
예제 #10
0
 public void reg_channel(Ichannel ch)
 {
     event_set.Add(ch);
 }
예제 #11
0
 public void unreg_channel(Ichannel ch)
 {
     event_set.Remove(ch);
 }
예제 #12
0
 public void reg_channel(Ichannel ch)
 {
     event_set.Add(ch);
 }