private static void DownloadSymbolsForAllFiles(string currentDirectory, string symbolPath) { IEnumerable <string> dlls = Directory.GetFiles(currentDirectory, "*.dll", SearchOption.AllDirectories); dlls = dlls.Concat(Directory.GetFiles(currentDirectory, "*.exe", SearchOption.AllDirectories)); foreach (var file in dlls) { if (!PEFile.PEFileReader.IsManagedAssembly(file)) { continue; } var pdb = Path.ChangeExtension(file, ".pdb"); if (!File.Exists(pdb)) { DownloadSymbols(file, symbolPath); } else if (!PdbInfo.IsMatch(file, pdb)) { File.Delete(pdb); DownloadSymbols(file, pdb); } } }
private static void CheckMatch(string dll, string pdb) { if (PdbInfo.IsMatch(dll, pdb)) { Log("Match", ConsoleColor.Green); } else { Log("No match", ConsoleColor.Red); } }
private static void FindMatchingPdb(string dll, string directory) { var pdbs = Directory.GetFiles( directory, Path.GetFileNameWithoutExtension(dll) + ".pdb", SearchOption.AllDirectories); var debugDirectory = PdbInfo.Read(dll); foreach (var pdb in pdbs) { if (PdbInfo.IsMatch(debugDirectory, pdb)) { Log("Match: " + pdb, ConsoleColor.Green); } } }