Example #1
0
        private async Task readExportTable(Action <DomainLoadProgress> progress)
        {
            DomainLoadProgress message = new DomainLoadProgress {
                Text = "Reading Export Table...", Current = 0, Total = ExportTableCount
            };

            reader.Seek(ExportTableOffset);

            for (int i = 0; i < ExportTableCount; ++i)
            {
                DomainExportTableEntry export = new DomainExportTableEntry {
                    TableIndex = i + 1
                };

                await export.ReadExportTableEntry(reader, this);

                ExportTable.Add(export);

                message.IncrementCurrent();

                if (ExportTableCount > 100)
                {
                    progress?.Invoke(message);
                }
            }

            message.Text    = "Expanding References...";
            message.Current = 0;
            message.Total   = 0;

            progress?.Invoke(message);

            await ExportTable.ForEachAsync(export => Task.Run(() => export.ExpandReferences(this)));
        }