Пример #1
0
        /// <summary>
        /// Loads a Project object from its serialized representation. First loads the programs
        /// and then any extra metadata files.
        /// </summary>
        /// <param name="sp"></param>
        /// <returns></returns>
        public Project LoadProject(string filename, Project_v3 sp)
        {
            var programs = sp.Inputs.OfType <DecompilerInput_v3>().Select(s => VisitInputFile(filename, s));
            var typelibs = sp.Inputs.OfType <MetadataFile_v3>().Select(m => VisitMetadataFile(filename, m));
            var asm      = sp.Inputs.OfType <AssemblerFile_v3>().Select(s => VisitAssemblerFile(s));

            this.project.LoadedMetadata = this.platform.CreateMetadata();
            project.Programs.AddRange(programs);
            project.MetadataFiles.AddRange(typelibs);
            return(this.project);
        }
Пример #2
0
 public Project LoadProject(string filename, Project_v3 sp)
 {
     var programs = sp.Inputs.OfType<DecompilerInput_v3>().Select(s => VisitInputFile(filename, s)).ToList();
     var typelibs = sp.Inputs.OfType<MetadataFile_v3>().Select(m => VisitMetadataFile(filename, m)).ToList();
     sp.Inputs.OfType<AssemblerFile_v3>().Select(s => VisitAssemblerFile(s));
     this.project.LoadedMetadata = this.platform?.CreateMetadata();
     foreach (var program in programs)
     {
         program.EnvironmentMetadata = this.project.LoadedMetadata;
     }
     project.Programs.AddRange(programs);
     project.MetadataFiles.AddRange(typelibs);
     return this.project;
 }
Пример #3
0
 public Project VisitProject_v3(Project_v3 sProject) { return outer.LoadProject(filename, sProject); }