public Serialize ( string projectAbsPath, Project project ) : Project_v4 | ||
projectAbsPath | string | |
project | Project | |
리턴 | Project_v4 |
/// <summary> /// Saves the project. /// </summary> /// <returns>False if the user cancelled the save, true otherwise.</returns> public bool Save() { if (decompilerSvc.Decompiler == null) return true; if (string.IsNullOrEmpty(this.ProjectFileName)) { string newName = PromptForFilename( Path.ChangeExtension( decompilerSvc.Decompiler.Project.Programs[0].Filename, Project_v3.FileExtension)); if (newName == null) return false; ProjectFileName = newName; mru.Use(newName); } var fsSvc = Services.RequireService<IFileSystemService>(); using (var xw = fsSvc.CreateXmlWriter(ProjectFileName)) { var saver = new ProjectSaver(sc); var sProject = saver.Serialize(ProjectFileName, decompilerSvc.Decompiler.Project); saver.Save(sProject, xw); } return true; }