public TdrError.ErrorType unpack(ref byte[] buffer, int size, ref int usedSize, uint cutVer)
        {
            if (((buffer == null) || (buffer.GetLength(0) == 0)) || (size > buffer.GetLength(0)))
            {
                return(TdrError.ErrorType.TDR_ERR_INVALID_BUFFER_PARAMETER);
            }
            TdrReadBuf srcBuf = ClassObjPool <TdrReadBuf> .Get();

            srcBuf.set(ref buffer, size);
            TdrError.ErrorType type = this.unpack(ref srcBuf, cutVer);
            usedSize = srcBuf.getUsedSize();
            srcBuf.Release();
            return(type);
        }
        public TdrError.ErrorType unpack(ref byte[] buffer, int size, ref int usedSize, uint cutVer)
        {
            if (buffer == null || buffer.GetLength(0) == 0 || size > buffer.GetLength(0))
            {
                return(TdrError.ErrorType.TDR_ERR_INVALID_BUFFER_PARAMETER);
            }
            TdrReadBuf tdrReadBuf = ClassObjPool <TdrReadBuf> .Get();

            tdrReadBuf.set(ref buffer, size);
            TdrError.ErrorType result = this.unpack(ref tdrReadBuf, cutVer);
            usedSize = tdrReadBuf.getUsedSize();
            tdrReadBuf.Release();
            return(result);
        }