async Task <XmlElement> Save(ProjectItem it) { Project p = CreateProject(); p.Items.Add(it); try { await p.SaveAsync(new MonoDevelop.Core.ProgressMonitor()); return(LoadElement(p.FileName, it.Include)); } finally { System.IO.File.Delete(p.FileName); } }
Task SaveProject (ProgressMonitor monitor, Project project) { Directory.CreateDirectory (project.BaseDirectory); return project.SaveAsync (monitor); }