示例#1
0
        public static VMExportInfo FromReader(ref BinaryStreamReader reader)
        {
            uint offset   = reader.ReadUInt32();
            uint entryKey = offset != 0 ? reader.ReadUInt32() : 0;

            return(new VMExportInfo
            {
                EntrypointAddress = offset,
                EntryKey = entryKey,
                Signature = VMFunctionSignature.FromReader(ref reader)
            });
        }
示例#2
0
        public static VMFunctionSignature FromReader(IBinaryStreamReader reader)
        {
            var result = new VMFunctionSignature
            {
                Flags = reader.ReadByte()
            };

            uint count = Utils.ReadCompressedUInt(reader);

            for (var i = 0; i < count; i++)
            {
                result.ParameterTokens.Add(
                    new MetadataToken(Utils.FromCodedToken(Utils.ReadCompressedUInt(reader))));
            }

            result.ReturnToken = new MetadataToken(Utils.FromCodedToken(Utils.ReadCompressedUInt(reader)));

            return(result);
        }