} // Read

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

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

        internal bool IsNull(ConstantUInt32ArrayHandle handle)
        {
            return (handle._value & 0x00FFFFFF) == 0;
        } // IsNull
        } // ToHandle

        internal Handle ToHandle(ConstantUInt32ArrayHandle handle)
        {
            return new Handle(handle._value);
        } // ToHandle
        } // GetConstantUInt16Value

        public ConstantUInt32Array GetConstantUInt32Array(ConstantUInt32ArrayHandle handle)
        {
            var record = new ConstantUInt32Array() { _reader = this, _handle = handle };
            var offset = (uint)handle.Offset;
            offset = _streamReader.Read(offset, out record._value);
            return record;
        } // GetConstantUInt32Array
        } // Equals

        public bool Equals(ConstantUInt32ArrayHandle handle)
        {
            return _value == handle._value;
        } // Equals
Example #7
0
        } // Read

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