} // Read

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

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

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

        internal Handle ToHandle(ConstantStringArrayHandle handle)
        {
            return new Handle(handle._value);
        } // ToHandle
        } // GetConstantSingleValue

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

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

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