Exemplo n.º 1
0
        } // Read

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

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

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

        internal Handle ToHandle(TypeForwarderHandle handle)
        {
            return new Handle(handle._value);
        } // ToHandle
Exemplo n.º 5
0
        } // GetTypeDefinition

        public TypeForwarder GetTypeForwarder(TypeForwarderHandle handle)
        {
            var record = new TypeForwarder() { _reader = this, _handle = handle };
            var offset = (uint)handle.Offset;
            offset = _streamReader.Read(offset, out record._scope);
            offset = _streamReader.Read(offset, out record._name);
            offset = _streamReader.Read(offset, out record._nestedTypes);
            offset = _streamReader.Read(offset, out record._customAttributes);
            return record;
        } // GetTypeForwarder
Exemplo n.º 6
0
        } // Equals

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

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