Exemple #1
0
        public object InvokeStatic(string className, string method, ParamsList args)
        {
            Type   type;
            object result;

            if (!this.TryFindType(className.Replace('.', '+'), out type))
            {
                result = null;
            }
            else
            {
                MethodInfo method2 = type.GetMethod(method, BindingFlags.Static);
                if (method2 == null)
                {
                    result = null;
                }
                else if (method2.ReturnType == typeof(void))
                {
                    method2.Invoke(null, args.ToArray());
                    result = true;
                }
                else
                {
                    result = method2.Invoke(null, args.ToArray());
                }
            }
            return(result);
        }
Exemple #2
0
        public TimedEvent CreateTimer(string name, int timeoutDelay, ParamsList args)
        {
            TimedEvent timer = CreateTimer(name, timeoutDelay);

            timer.Args        = args.ToArray();
            timer.OnFire     -= OnTimerCB;
            timer.OnFireArgs += OnTimerCBArgs;
            return(timer);
        }
Exemple #3
0
        public object InvokeStatic(string className, string method, ParamsList args)
        {
            System.Type type;
            if (!this.TryFindType(className.Replace('.', '+'), out type))
            {
                return(null);
            }

            MethodInfo info = type.GetMethod(method, BindingFlags.Static);

            if (info == null)
            {
                return(null);
            }
            if (info.ReturnType == typeof(void))
            {
                info.Invoke(null, args.ToArray());
                return(true);
            }
            return(info.Invoke(null, args.ToArray()));
        }
Exemple #4
0
 public TimedEvent CreateTimer(string name, int timeoutDelay, ParamsList args)
 {
     return(this.CreateTimer(name, timeoutDelay, args.ToArray()));
 }
Exemple #5
0
 public TimedEvent CreateTimer(string name, int timeoutDelay, ParamsList args)
 {
     return this.CreateTimer(name, timeoutDelay, args.ToArray());
 }