public static void StoreFileName(StringHashPair file) { if (Program.CASCEngine.FileExists(file.Hash)) { string extension = Path.GetExtension(file.Value); if (extension == null || extension == string.Empty) return; extension = extension.Substring(1).ToLower(); if (!Cache.ContainsKey(extension)) { Cache.Add(extension, new List<StringHashPair>()); Log.Write("FileNameCache: Registered new extension {0}.", extension); } Cache[extension].Add(file); } }
public static void StoreFileName(StringHashPair file) { if (Program.CASCEngine.FileExists(file.Hash)) { string extension = Path.GetExtension(file.Value); if (extension == null || extension == string.Empty) { return; } extension = extension.Substring(1).ToLower(); if (!Cache.ContainsKey(extension)) { Cache.Add(extension, new List <StringHashPair>()); Log.Write("FileNameCache: Registered new extension {0}.", extension); } Cache[extension].Add(file); } }