2
using System.Collections.Generic;
4
namespace Mono.Debugger.Soft
7
* Represents a valuetype value in the debuggee
9
public class StructMirror : Value {
14
internal StructMirror (VirtualMachine vm, TypeMirror type, Value[] fields) : base (vm, 0) {
19
public TypeMirror Type {
25
public Value[] Fields {
31
public Value this [String field] {
33
FieldInfoMirror[] field_info = Type.GetFields ();
35
for (int i = 0; i < field_info.Length; ++i) {
36
if (!field_info [i].IsStatic) {
37
if (field_info [i].Name == field)
42
throw new ArgumentException ("Unknown struct field '" + field + "'.", "field");
46
internal void SetField (int index, Value value) {
47
fields [index] = value;
50
public Value InvokeMethod (ThreadMirror thread, MethodMirror method, IList<Value> arguments) {
51
return ObjectMirror.InvokeMethod (vm, thread, method, this, arguments, InvokeOptions.None);
54
public Value InvokeMethod (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options) {
55
return ObjectMirror.InvokeMethod (vm, thread, method, this, arguments, options);
58
[Obsolete ("Use the overload without the 'vm' argument")]
59
public IAsyncResult BeginInvokeMethod (VirtualMachine vm, ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options, AsyncCallback callback, object state) {
60
return ObjectMirror.BeginInvokeMethod (vm, thread, method, this, arguments, options, callback, state);
63
public IAsyncResult BeginInvokeMethod (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options, AsyncCallback callback, object state) {
64
return ObjectMirror.BeginInvokeMethod (vm, thread, method, this, arguments, options, callback, state);
67
public Value EndInvokeMethod (IAsyncResult asyncResult) {
68
return ObjectMirror.EndInvokeMethodInternal (asyncResult);