public void AddRootFile(RootFile rootFile) { _rootFiles.Add(new XElement(Namespace + "rootfile", new XAttribute("full-path", rootFile.FullPath), new XAttribute("media-type", rootFile.MediaType) )); }
public void RemoveRootFile(RootFile rootFile) { _rootFiles.Descendants().SingleOrDefault(p => p.Name == "rootfile" && p.Attribute("full-path")?.Value == rootFile.FullPath && p.Attribute("media-type")?.Value == rootFile.MediaType)?.Remove(); }