2 using System
.Collections
.Generic
;
4 namespace Mono
.Debugger
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 ();
34 for (int i
= 0; i
< field_info
.Length
; ++i
)
35 if (field_info
[i
].Name
== field
)
37 throw new ArgumentException ("Unknown struct field '" + field
+ "'.", "field");
41 internal void SetField (int index
, Value
value) {
42 fields
[index
] = value;
45 public Value
InvokeMethod (ThreadMirror thread
, MethodMirror method
, IList
<Value
> arguments
) {
46 return ObjectMirror
.InvokeMethod (vm
, thread
, method
, this, arguments
);