Пример #1
0
        public Img(Stream stream, IEnumerable <Idx.Entry> idxEntries, bool loadAllIdx)
        {
            this.stream = stream;
            Entries     = new IdxDictionary
            {
                idxEntries
            };

            if (loadAllIdx)
            {
                foreach (var fileName in InternalIdxs)
                {
                    FileOpen(fileName, entryStream =>
                    {
                        Entries.Add(Idx.Read(entryStream));
                    });
                }
            }
        }
Пример #2
0
 public static string Lookup(Idx.Entry entry) =>
 _nameDictionary.TryGetValue(IdxDictionary.GetHash(entry), out var name) ? name : null;
Пример #3
0
 public static string Lookup(uint hash32, ushort hash16) =>
 _nameDictionary.TryGetValue(IdxDictionary.GetHash(hash32, hash16), out var name) ? name : null;