public DatabaseVariable() { _bId = 0; _abValue = null; _eDataType = nDataType.None; _iLength = _iValueBufferLength = 0; }
protected bool ReadUInt64(byte[] abBuffer, int iOffset) { bool isReturn = (abBuffer != null) && (iOffset >= 0) && (abBuffer.Length > (iOffset + 7)); if (isReturn) { _eDataType = nDataType.UInt64; _iLength = 8; if (_iLength > _iValueBufferLength) { ExtendValueBuffer(_iLength); } for (int i = 0; i < _iLength; i++) { _abValue[i] = abBuffer[iOffset + i]; } } return(isReturn); }
protected bool ReadByteArray(byte[] abBuffer, int iOffset, nDataType eDataType) { bool isReturn = (abBuffer != null) && (iOffset >= 0) && (abBuffer.Length > (iOffset + 1)); if (isReturn) { _eDataType = eDataType; _iLength = BitConverter.ToUInt16(abBuffer, iOffset) + 2; isReturn = abBuffer.Length >= (iOffset + _iLength); if (isReturn) { if (_iLength > _iValueBufferLength) { ExtendValueBuffer(_iLength); } for (int i = 0; i < _iLength; i++) { _abValue[i] = abBuffer[i + iOffset]; } } } return(isReturn); }