XElement EnsureRoot(Persistence.IXMLStorageSection sect) { XElement root = sect.Data.Element(RootNodeName); if (root == null) { sect.Data.Add(root = new XElement(RootNodeName)); } return(root); }
private bool IsOutputOutdated(ILogSource logSource, Persistence.IXMLStorageSection outputSection) { var logSourceEtag = logSource.Provider.Stats.ContentsEtag; if (logSourceEtag != null) { var etagAttr = outputSection.Data.Root.Attribute(XName.Get("etag", xmlNs)); if (etagAttr != null) { if (logSourceEtag.Value.ToString() != etagAttr.Value) { return(true); } } } return(false); }