public static RemoteValueFake CreateSimpleDouble(string name, double val) { var remoteValue = new RemoteValueFake(name, val.ToString()); var type = new SbTypeStub("double", TypeFlags.IS_FLOAT); type.SetByteSize(sizeof(double)); remoteValue.SetTypeInfo(type); return(remoteValue); }
public static RemoteValueFake CreateSimpleBool(string name, bool val) { var remoteValue = new RemoteValueFake(name, val ? "true" : "false"); var type = new SbTypeStub("bool", TypeFlags.IS_SCALAR); type.SetByteSize(sizeof(bool)); remoteValue.SetTypeInfo(type); return(remoteValue); }
public static RemoteValueFake CreateSimpleLong(string name, long val) { var remoteValue = new RemoteValueFake(name, val.ToString()); var type = new SbTypeStub("long", TypeFlags.IS_INTEGER); type.SetByteSize(sizeof(long)); remoteValue.SetTypeInfo(type); return(remoteValue); }
public static RemoteValueFake CreateSimpleChar(string name, char val) { var remoteValue = new RemoteValueFake(name, val.ToString()); var type = new SbTypeStub("char", TypeFlags.IS_SCALAR); type.SetByteSize(sizeof(char)); remoteValue.SetTypeInfo(type); return(remoteValue); }
public static RemoteValueFake CreateAddressOf(RemoteValueFake remoteValue, long address) { var sbAddress = new RemoteValueFake(null, $"0x{address.ToString("X")}"); var type = new SbTypeStub($"{remoteValue.GetTypeName()}*", TypeFlags.HAS_CHILDREN | TypeFlags.IS_POINTER | TypeFlags.HAS_VALUE); type.SetByteSize(PtrSize); sbAddress.SetTypeInfo(type); sbAddress.AddChild(remoteValue); return(sbAddress); }