Esempio n. 1
0
        } // Read

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

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

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

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

        public PointerSignature GetPointerSignature(PointerSignatureHandle handle)
        {
            var record = new PointerSignature() { _reader = this, _handle = handle };
            var offset = (uint)handle.Offset;
            offset = _streamReader.Read(offset, out record._type);
            return record;
        } // GetPointerSignature
Esempio n. 6
0
        } // Equals

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

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