private SqlBoolean(ObjectData data) : this() { if (data.HasValue("Value")) { value = data.GetByte("Value"); } }
private SqlNumber(ObjectData data) : this() { var state = (NumericState)data.GetByte("State"); if (state == NumericState.None) { var bytes = data.GetValue <byte[]>("Bytes"); var scale = data.GetInt32("Scale"); var precision = data.GetInt32("Precision"); innerValue = new BigDecimal(new BigInteger(bytes), scale, new MathContext(precision)); } State = state; }
private NumericType(ObjectData data) : base(data) { Size = data.GetInt32("Size"); Scale = data.GetByte("Scale"); }