public VisitProgram ( string projectAbsPath, System.Program program ) : ProjectFile_v3 | ||
projectAbsPath | string | |
program | System.Program | |
Résultat | ProjectFile_v3 |
private void When_SaveToTextWriter(Program program, TextWriter sw) { var saver = new ProjectSaver(); var sProj = new Project_v3 { Inputs = { saver.VisitProgram(program) } }; var writer = new FilteringXmlWriter(sw); writer.Formatting = System.Xml.Formatting.Indented; XmlSerializer ser = SerializedLibrary.CreateSerializer_v3(typeof(Project_v3)); ser.Serialize(writer, sProj); }
public void SudSaveProgramOptions() { var program = new Program(); program.Options.HeuristicScanning = true; var pSaver = new ProjectSaver(); var file = pSaver.VisitProgram(program); var ip = (DecompilerInput_v2)file; Assert.IsTrue(ip.Options.HeuristicScanning); }
public void SudSaveProgramOptions() { var program = new Program(); program.User.Heuristics.Add("shingle"); var pSaver = new ProjectSaver(); var file = pSaver.VisitProgram(program); var ip = (DecompilerInput_v3)file; Assert.IsTrue(ip.User.Heuristics.Any(h => h.Name == "shingle")); }
public void SudSaveProgramOptions() { var program = new Program(); program.User.Heuristics.Add("shingle"); program.User.TextEncoding = Encoding.GetEncoding("windows-1251"); var pSaver = new ProjectSaver(sc); var file = pSaver.VisitProgram("foo.proj", program); var ip = (DecompilerInput_v4)file; Assert.IsTrue(ip.User.Heuristics.Any(h => h.Name == "shingle")); Assert.AreEqual("windows-1251", ip.User.TextEncoding); }