public void SetNameTableIndex(DomainNameTableEntry nameTableEntry, int numeric = 0) { Index = nameTableEntry.TableIndex; Numeric = numeric; Name = nameTableEntry.Name.String; }
public static DomainNameTableEntry AddDomainNameTableEntry(this List<DomainNameTableEntry> nameTable, string value) { DomainString valueString = new DomainString(); valueString.SetString(value); int index = nameTable.Max(nt => nt.TableIndex) + 1; DomainNameTableEntry entry = new DomainNameTableEntry(); entry.SetNameTableEntry(valueString, 0x0007001000000000, index); nameTable.Add(entry); return entry; }
private async Task readNameTable(Action<DomainLoadProgress> progress) { DomainLoadProgress message = new DomainLoadProgress { Text = "Reading Name Table...", Current = 0, Total = NameTableCount }; reader.Seek(NameTableOffset); for(int i = 0; i < NameTableCount; ++i) { DomainNameTableEntry name = new DomainNameTableEntry { TableIndex = i }; await name.ReadNameTableEntry(reader); NameTable.Add(name); message.IncrementCurrent(); if (NameTableCount > 100) progress?.Invoke(message); } }