public static ConversionMap Load(string path)
        {
            var result = new ConversionMap();
            var map    = JsonConvert.DeserializeObject <Dictionary <string, Dictionary <string, uint> > >(File.ReadAllText(path));

            foreach (var kvp in map)
            {
                foreach (var entry in kvp.Value)
                {
                    var key  = new InibinKey(kvp.Key, entry.Key);
                    var hash = entry.Value;
                    result.Add(key, hash);
                }
            }
            return(result);
        }
        public void ExportData(string directory)
        {
            Directory.CreateDirectory(directory);
            var converter = new InibinConverter(ConversionMap.FromHashCollection(_draft));

            foreach (var file in _files)
            {
                var inibin  = _manager.ReadInibin(file.FullName);
                var item    = ContentFile.FromInibin(inibin, converter);
                var orgPath = Path.GetDirectoryName(file.FullName);
                var orgName = Path.GetFileNameWithoutExtension(file.FullName);
                Directory.CreateDirectory(directory + "/" + orgPath);
                var savePath = directory + "/" + orgPath + "/" + orgName + ".json";
                File.WriteAllText(savePath, item.Serialize());
            }
        }
 public InibinConverter(ConversionMap conversionMap)
 {
     _conversionMap = conversionMap;
     _keyToValue    = new Dictionary <InibinKey, InibinValue>();
     _hashToValue   = new Dictionary <uint, InibinValue>();
 }