Ejemplo n.º 1
0
        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);
                }
            }
        }
Ejemplo n.º 2
0
 private static void CheckMatch(string dll, string pdb)
 {
     if (PdbInfo.IsMatch(dll, pdb))
     {
         Log("Match", ConsoleColor.Green);
     }
     else
     {
         Log("No match", ConsoleColor.Red);
     }
 }
Ejemplo n.º 3
0
        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);
                }
            }
        }