Mono.Debugger.Soft.TypeMirror.InvokeMethod C# (CSharp) Method

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 InvokeMethod (ThreadMirror thread, MethodMirror method, IList<Value> arguments) {
			return ObjectMirror.InvokeMethod (vm, thread, method, null, arguments, InvokeOptions.None);
		}

Same methods

TypeMirror::InvokeMethod ( ThreadMirror thread, Mono.Debugger.Soft.MethodMirror method, IList arguments, InvokeOptions options ) : Mono.Debugger.Soft.Value

Usage Example

Exemplo n.º 1
0
        public static VariableItem GetChild(ThreadMirror thread, VariableItem parentItem, TypeMirror parent, int index)
        {
            var props = (from p in parent.GetAllProperties() where p.HasSimpleGetter() && (p.GetGetMethod(true) != null && p.GetGetMethod(true).IsStatic) || (p.GetSetMethod(true) != null && p.GetSetMethod(true).IsStatic) select p).ToArray();
            if (index < props.Length)
            {
                PropertyInfoMirror prop = props[index];
                MethodMirror method = parent.ResolveProperty(prop.Name);
                Value child = parent.InvokeMethod(thread, method, new Value[0], InvokeOptions.DisableBreakpoints | InvokeOptions.SingleThreaded);
                return new VariableItem(thread, prop.Name, parentItem, prop, child, index);
            }
            else
            {
                var fields = from f in parent.GetAllFields() where f.IsStatic select f;
                FieldInfoMirror field = fields.ElementAt(index - props.Length);

                Value child;
                if (field.HasCustomAttribute("System.ThreadStaticAttribute"))
                    child = field.DeclaringType.GetValue(field, thread);
                else
                    child = field.DeclaringType.GetValue(field);
                return new VariableItem(thread, field.Name, parentItem, index, child, index);
            }
        }