private bool LoadDumpOne(string file) { string shortName = Path.GetFileNameWithoutExtension(file); string problemsPathFile = Path.Combine(problemsPath, shortName); string midleName = file.Substring(basePath.Length); Console.WriteLine("Reading {0} ", midleName); Project pp = new Project(rules, file); Project np = new Project(rules, file); ParseResult pr = pparser.Parse(pp, null); ParseResult nr = nparser.Parse(np, null); if (!nr.Succesfull && !pr.Succesfull) { //both failed return(true); } else if (!pr.Succesfull) { if (pr.Messages.Count != 0) { File.WriteAllText(problemsPathFile + ".pErr", pr.Dump()); } np.Warriors[0].Dump(problemsPathFile + ".nDmp", ParserOptions.Full); } else if (!nr.Succesfull) { if (nr.Messages.Count != 0) { File.WriteAllText(problemsPathFile + ".nErr", nr.Dump()); } pp.Warriors[0].Dump(problemsPathFile + ".pDmp", ParserOptions.Full); } else if (!Warrior.Equals(np.Warriors[0], pp.Warriors[0])) { if (pr.Messages.Count != 0) { File.WriteAllText(problemsPathFile + ".pErr", pr.Dump()); } if (nr.Messages.Count != 0) { File.WriteAllText(problemsPathFile + ".nErr", nr.Dump()); } np.Warriors[0].Wrap(); pp.Warriors[0].Wrap(); np.Warriors[0].Dump(problemsPathFile + ".nDmp", ParserOptions.Full); pp.Warriors[0].Dump(problemsPathFile + ".pDmp", ParserOptions.Full); } else { // no problem return(true); } File.Copy(file, problemsPathFile + ".red", true); return(false); }