Esempio n. 1
0
        } // Read

        public static uint Read(this NativeReader reader, uint offset, out ConstantBooleanValueHandle handle)
        {
            uint value;
            offset = reader.DecodeUnsigned(offset, out value);
            handle = new ConstantBooleanValueHandle((int)value);
            handle._Validate();
            return offset;
        } // Read
Esempio n. 2
0
        } // Read

        public static uint Read(this NativeReader reader, uint offset, out ConstantBooleanValueHandle[] values)
        {
            uint count;
            offset = reader.DecodeUnsigned(offset, out count);
            if (count == 0)
            {
                values = s_emptyConstantBooleanValueHandleArray;
            }
            else
            {
                values = new ConstantBooleanValueHandle[count];
                for (uint i = 0; i < count; ++i)
                {
                    ConstantBooleanValueHandle tmp;
                    offset = reader.Read(offset, out tmp);
                    values[i] = tmp;
                }
            }
            return offset;
        } // Read
Esempio n. 3
0
        } // IsNull

        internal bool IsNull(ConstantBooleanValueHandle handle)
        {
            return (handle._value & 0x00FFFFFF) == 0;
        } // IsNull
Esempio n. 4
0
        } // ToHandle

        internal Handle ToHandle(ConstantBooleanValueHandle handle)
        {
            return new Handle(handle._value);
        } // ToHandle
Esempio n. 5
0
        } // GetConstantBooleanArray

        public ConstantBooleanValue GetConstantBooleanValue(ConstantBooleanValueHandle handle)
        {
            var record = new ConstantBooleanValue() { _reader = this, _handle = handle };
            var offset = (uint)handle.Offset;
            offset = _streamReader.Read(offset, out record._value);
            return record;
        } // GetConstantBooleanValue
Esempio n. 6
0
        } // Equals

        public bool Equals(ConstantBooleanValueHandle handle)
        {
            return _value == handle._value;
        } // Equals
Esempio n. 7
0
        } // Read

        public static uint Read(this NativeReader reader, uint offset, out ConstantBooleanValueHandle[] values)
        {
            uint count;
            offset = reader.DecodeUnsigned(offset, out count);
            #if !NETFX_45
            if (count == 0)
            {
                values = Array.Empty<ConstantBooleanValueHandle>();
            }
            else
            #endif
            {
                values = new ConstantBooleanValueHandle[count];
                for (uint i = 0; i < count; ++i)
                {
                    ConstantBooleanValueHandle tmp;
                    offset = reader.Read(offset, out tmp);
                    values[i] = tmp;
                }
            }
            return offset;
        } // Read