Exemplo n.º 1
0
        IMySqlValue IMySqlValue.ReadValue(MySqlStream stream, long length, bool nullVal)
        {
            if (nullVal)
            {
                return(new MySqlByte(true));
            }
            if (length == -1L)
            {
                return(new MySqlByte((sbyte)stream.ReadByte()));
            }
            string    s   = stream.ReadString(length);
            MySqlByte num = new MySqlByte(sbyte.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture));

            num.TreatAsBoolean = this.TreatAsBoolean;
            return(num);
        }
Exemplo n.º 2
0
 IMySqlValue IMySqlValue.ReadValue(MySqlStream stream, long length, bool nullVal)
 {
     if (nullVal)
     {
         return new MySqlByte(true);
     }
     if (length == -1L)
     {
         return new MySqlByte((sbyte) stream.ReadByte());
     }
     string s = stream.ReadString(length);
     MySqlByte num = new MySqlByte(sbyte.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture));
     num.TreatAsBoolean = this.TreatAsBoolean;
     return num;
 }