Ejemplo n.º 1
0
		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;
		}
Ejemplo n.º 2
0
		public void SkipValue(MySqlStream stream) {
			long num = stream.ReadFieldLength();
			stream.SkipBytes((int)num);
		}
Ejemplo n.º 3
0
		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;
		}