コード例 #1
0
        public virtual void TestBoolean()
        {
            bool b1 = true;

            byte[] b2 = byteArrayConverter.BooleanToByteArray(b1);
            bool   b3 = byteArrayConverter.ByteArrayToBoolean(b2, 0);

            AssertEquals(b1, b3);
            b1 = false;
            b2 = byteArrayConverter.BooleanToByteArray(b1);
            b3 = byteArrayConverter.ByteArrayToBoolean(b2, 0);
            AssertEquals(b1, b3);
        }
コード例 #2
0
        public virtual bool ReadBoolean(string label)
        {
            long position = io.GetCurrentPosition();
            bool b        = byteArrayConverter.ByteArrayToBoolean(ReadBooleanBytes(), 0);

            if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogId) && canLog && label != null)
            {
                NeoDatis.Tool.DLogger.Debug("reading boolean " + b + " at " + position + " : " +
                                            label);
            }
            return(b);
        }