InvokeMethod() public method

public InvokeMethod ( ThreadMirror thread, Mono.Debugger.Soft.MethodMirror method, IList arguments ) : Mono.Debugger.Soft.Value
thread ThreadMirror
method Mono.Debugger.Soft.MethodMirror
arguments IList
return Mono.Debugger.Soft.Value
        public Value NewInstance(ThreadMirror thread, MethodMirror method, IList <Value> arguments, InvokeOptions options)
        {
            if (method == null)
            {
                throw new ArgumentNullException("method");
            }

            if (!method.IsConstructor)
            {
                throw new ArgumentException("The method must be a constructor.", "method");
            }

            return(ObjectMirror.InvokeMethod(vm, thread, method, null, arguments, options));
        }
 public Value InvokeMethod(ThreadMirror thread, MethodMirror method, IList <Value> arguments, InvokeOptions options)
 {
     return(ObjectMirror.InvokeMethod(vm, thread, method, null, arguments, options));
 }
Beispiel #3
0
 public Value NewInstance(ThreadMirror thread, MethodMirror method, IList <Value> arguments)
 {
     return(ObjectMirror.InvokeMethod(vm, thread, method, null, arguments, InvokeOptions.None));
 }
Beispiel #4
0
 public Value InvokeMethod(ThreadMirror thread, MethodMirror method, IList <Value> arguments)
 {
     return(ObjectMirror.InvokeMethod(vm, thread, method, this, arguments, InvokeOptions.None));
 }
        public static void Set(ThreadMirror thread, VariableItem item, ObjectMirror parent, PropertyInfoMirror key, Value newValue)
        {
            Contract.Assert(key.HasSimpleGetter());		// indexors aren't shown...

            MethodMirror method = key.GetSetMethod(true);
            if (method != null)
            {
                Unused.Value = parent.InvokeMethod(thread, method, new Value[]{newValue}, InvokeOptions.DisableBreakpoints | InvokeOptions.SingleThreaded);
            }
            else
            {
                throw new Exception("Property does not have a setter.");
            }
        }
Beispiel #6
0
        private static Value DoEvaluateMethod(ThreadMirror thread, ObjectMirror obj, string name)
        {
            Value result = null;

            try
            {
                MethodMirror method = obj.Type.FindMethod(name, 0);
                if (method != null)
                {
                    result = obj.InvokeMethod(thread, method, new Value[0], InvokeOptions.DisableBreakpoints | InvokeOptions.SingleThreaded);
                }
            }
            catch (Exception e)
            {
                string mesg = string.Format("{0} calling {1}.{2}", e.Message, obj.TypeName(), name);
                result = obj.Domain.CreateString(mesg);
            }

            return result;
        }