Ejemplo n.º 1
0
        } // Read

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

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

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

        internal Handle ToHandle(ConstantUInt16ValueHandle handle)
        {
            return new Handle(handle._value);
        } // ToHandle
Ejemplo n.º 5
0
        } // GetConstantUInt16Array

        public ConstantUInt16Value GetConstantUInt16Value(ConstantUInt16ValueHandle handle)
        {
            var record = new ConstantUInt16Value() { _reader = this, _handle = handle };
            var offset = (uint)handle.Offset;
            offset = _streamReader.Read(offset, out record._value);
            return record;
        } // GetConstantUInt16Value
Ejemplo n.º 6
0
        } // Equals

        public bool Equals(ConstantUInt16ValueHandle handle)
        {
            return _value == handle._value;
        } // Equals
Ejemplo n.º 7
0
        } // Read

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