IMySqlValue IMySqlValue.ReadValue(MySqlStream stream, long length, bool nullVal) { if (nullVal) { return(new MySqlBinary(type, true)); } if (length == -1) { length = (long)stream.ReadFieldLength(); } byte[] newBuff = new byte[length]; stream.Read(newBuff, 0, (int)length); return(new MySqlBinary(type, newBuff)); }
IMySqlValue IMySqlValue.ReadValue(MySqlStream stream, long length, bool nullVal) { MySqlBinary binary; if (nullVal) { binary = new MySqlBinary(this.type, true); } else { if (length == -1L) { length = stream.ReadFieldLength(); } byte[] buffer = new byte[length]; stream.Read(buffer, 0, (int)length); binary = new MySqlBinary(this.type, buffer); } binary.IsGuid = this.IsGuid; return(binary); }
public IMySqlValue ReadValue(MySqlStream stream, long length, bool isNull) { this.isNull = isNull; if (!isNull) { if (this.buffer == null) { this.buffer = new byte[8]; } if (length == -1L) { length = stream.ReadFieldLength(); } Array.Clear(this.buffer, 0, this.buffer.Length); for (long i = length - 1L; i >= 0L; i -= 1L) { this.buffer[(int)((IntPtr)i)] = (byte)stream.ReadByte(); } this.mValue = BitConverter.ToUInt64(this.buffer, 0); } return(this); }
IMySqlValue IMySqlValue.ReadValue(MySqlStream stream, long length, bool nullVal) { MySqlBinary b; if (nullVal) { b = new MySqlBinary(type, true); } else { if (length == -1) { length = (long)stream.ReadFieldLength(); } byte[] newBuff = new byte[length]; stream.Read(newBuff, 0, (int)length); b = new MySqlBinary(type, newBuff); } b.IsGuid = this.IsGuid; return(b); }
public IMySqlValue ReadValue(MySqlStream stream, long length, bool isNull) { if (isNull) { this.isNull = true; return(this); } if (buffer == null) { buffer = new byte[8]; } if (length == -1) { length = stream.ReadFieldLength(); } Array.Clear(buffer, 0, buffer.Length); for (long i = length - 1; i >= 0; i--) { buffer[i] = (byte)stream.ReadByte(); } mValue = BitConverter.ToUInt64(buffer, 0); return(this); }
void IMySqlValue.SkipValue(MySqlStream stream) { long num = stream.ReadFieldLength(); stream.SkipBytes((int)num); }
public void SkipValue(MySqlStream stream) { long len = stream.ReadFieldLength(); stream.SkipBytes((int)len); }