Manually merging a few changes to the ContentService, ContentFactory, ContentRepository and ContentExtensions to avoid a merge hell when pushing latest to the legacy refactor branch.

Current checkin has a few new failing tests due to recent changes, but a few should be resolved by adding a DataTypesResolver setup in the ContentServiceTests fixture.
This commit is contained in:
Morten Christensen
2012-12-14 15:19:54 -01:00
parent 6bc5ba2b4c
commit f5bfb90b64
23 changed files with 894 additions and 730 deletions

View File

@@ -18,14 +18,8 @@ namespace Umbraco.Core.Models
var xd = new XmlDocument();
XmlNode xmlNode = xd.CreateNode(XmlNodeType.Element, nodeName, "");
XmlNode child = property.PropertyType.DataTypeDatabaseType == DataTypeDatabaseType.Ntext
? xd.CreateCDataSection(property.Value.ToString()) as XmlNode
: xd.CreateTextNode(property.Value.ToString());
xmlNode.AppendChild(child);
//This seems to fail during testing
//xmlNode.AppendChild(property.PropertyType.DataType(property.Id).Data.ToXMl(xd));
xmlNode.AppendChild(property.PropertyType.DataType(property.Id).Data.ToXMl(xd));
var element = xmlNode.GetXElement();
return element;