/// <inheritdoc />
        protected override void Initialize()
        {
            if (!_peFile.TryCreateDataDirectoryReader(_dataDirectory, out var reader))
            {
                return;
            }

            while (true)
            {
                var entry = ImportedModule.FromReader(_peFile, reader);
                if (entry == null)
                {
                    break;
                }
                Items.Add(entry);
            }
        }
Пример #2
0
        /// <inheritdoc />
        protected override void Initialize()
        {
            if (!_context.File.TryCreateDataDirectoryReader(_dataDirectory, out var reader))
            {
                _context.BadImage("Invalid import data directory RVA and/or size.");
                return;
            }

            while (true)
            {
                var entry = ImportedModule.FromReader(_context, reader);
                if (entry == null)
                {
                    break;
                }
                Items.Add(entry);
            }
        }