IMySqlValue IMySqlValue.ReadValue(MySqlStream stream, long length, bool nullVal) { if (nullVal) { return new MySqlDecimal(true); } if (length == -1L) { return new MySqlDecimal(decimal.Parse(stream.ReadLenString(), CultureInfo.InvariantCulture)); } return new MySqlDecimal(decimal.Parse(stream.ReadString(length), CultureInfo.InvariantCulture)); }
IMySqlValue IMySqlValue.ReadValue(MySqlStream stream, long length, bool nullVal) { if (nullVal) { return new MySqlString(this.type, true); } string val = string.Empty; if (length == -1L) { val = stream.ReadLenString(); } else { val = stream.ReadString(length); } return new MySqlString(this.type, val); }