public void FindFiles(string section, string name) { uint hash = HashFunctions.GetInibinHash(section, name); foreach (var entry in _files) { var file = _manager.ReadFile(entry.FullName).Uncompress(); var inibin = Inibin.DeserializeInibin(file, entry.FullName); foreach (var kvp in inibin.Content) { if (kvp.Key == hash) { Console.WriteLine("{0}: {1}", entry.FullName, kvp.Value.Value.ToString()); } } } }
public int TestHash(string section, string name) { Console.WriteLine("Testing: " + section + "*" + name); var hash = HashFunctions.GetInibinHash(section, name); if (_hashes.Contains(hash)) { if (_draft.Hashes.ContainsKey(hash)) { if (_draft.Hashes[hash].Keys.ToList().Contains(section, StringComparer.OrdinalIgnoreCase)) { if (_draft.Hashes[hash][section].Contains(name, StringComparer.OrdinalIgnoreCase)) { return(3); } } return(2); } return(1); } return(0); }