public ClrTypeConverterTest() { _clrInstanceFields = new List<ClrInstanceField> { _valueTypeField, _stringField, _referenceField, _boxedValueTypeField }; _type = new StubClrType { NameGet = () => TypeName, GetSizeUInt64 = _ => TypeSize, MethodsGet = () => new List<ClrMethod>(), FieldsGet = () => _clrInstanceFields, HeapGet = () => new StubClrHeap { GetObjectTypeUInt64 = address => { switch (address) { case ReferenceFieldValue: return new StubClrType { HasSimpleValueGet = () => false, FieldsGet = () => new ClrInstanceField[0], MethodsGet = () => new List<ClrMethod>(), }; case BoxedObjectAddress: return new StubClrType { HasSimpleValueGet = () => true, FieldsGet = () => new ClrInstanceField[0], MethodsGet = () => new List<ClrMethod>(), GetValueUInt64 = _ => BoxedValueTypeValue }; default: return null; } } } }; }
public StubClrTypeDecorator(StubClrType type) { _type = type; }