Ejemplo 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
Ejemplo 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
Ejemplo n.º 3
0
        } // IsNull

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

        internal Handle ToHandle(ConstantBooleanValueHandle handle)
        {
            return new Handle(handle._value);
        } // ToHandle
Ejemplo 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
Ejemplo n.º 6
0
        } // Equals

        public bool Equals(ConstantBooleanValueHandle handle)
        {
            return _value == handle._value;
        } // Equals
Ejemplo 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