U4-8469 - xml cache TLC

This commit is contained in:
Stephan
2016-06-23 09:39:31 +02:00
parent 980683d25a
commit 5b28260f96
3 changed files with 121 additions and 116 deletions

View File

@@ -277,15 +277,13 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
private static IPublishedContent ConvertToDocument(XmlNode xmlNode, bool isPreviewing)
{
return xmlNode == null
? null
: (new XmlPublishedContent(xmlNode, isPreviewing)).CreateModel();
return xmlNode == null ? null : XmlPublishedContent.Get(xmlNode, isPreviewing);
}
private static IEnumerable<IPublishedContent> ConvertToDocuments(XmlNodeList xmlNodes, bool isPreviewing)
{
return xmlNodes.Cast<XmlNode>()
.Select(xmlNode => (new XmlPublishedContent(xmlNode, isPreviewing)).CreateModel());
.Select(xmlNode => XmlPublishedContent.Get(xmlNode, isPreviewing));
}
#endregion