VisitProgram() public method

public VisitProgram ( string projectAbsPath, System.Program program ) : ProjectFile_v3
projectAbsPath string
program System.Program
return ProjectFile_v3
Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
        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);

        }
Exemplo n.º 3
0
        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"));
        }
Exemplo n.º 4
0
 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);
 }