} // Read

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

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

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

        internal Handle ToHandle(ArraySignatureHandle handle)
        {
            return new Handle(handle._value);
        } // ToHandle
 public ArraySignature GetArraySignature(ArraySignatureHandle handle)
 {
     var record = new ArraySignature() { _reader = this, _handle = handle };
     var offset = (uint)handle.Offset;
     offset = _streamReader.Read(offset, out record._elementType);
     offset = _streamReader.Read(offset, out record._rank);
     offset = _streamReader.Read(offset, out record._sizes);
     offset = _streamReader.Read(offset, out record._lowerBounds);
     return record;
 } // GetArraySignature
        } // Equals

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

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