示例#1
0
        public virtual int ReadInt(string label)
        {
            long position = io.GetCurrentPosition();
            int  i        = byteArrayConverter.ByteArrayToInt(ReadIntBytes(), 0);

            if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogId) && canLog)
            {
                NeoDatis.Tool.DLogger.Debug("reading int " + i + " at " + position + (label != null
                                         ? " : " + label : string.Empty));
            }
            return(i);
        }
示例#2
0
        public virtual void TestInt()
        {
            int l1 = 785412;

            byte[] b  = byteArrayConverter.IntToByteArray(l1);
            int    l2 = byteArrayConverter.ByteArrayToInt(b, 0);

            AssertEquals(l1, l2);
        }