Detached PublishedProperty

This commit is contained in:
Stephan
2014-04-02 11:22:38 +02:00
committed by Stephan
parent 12acdd8122
commit 1a02e6be97
11 changed files with 411 additions and 273 deletions

View File

@@ -463,14 +463,15 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
#endregion
#region Fragments
#region Detached
public IPublishedContent CreateFragment(string contentTypeAlias, IDictionary<string, object> dataValues,
bool isPreviewing, bool managed)
public IPublishedProperty CreateDetachedProperty(PublishedPropertyType propertyType, object value, bool isPreviewing)
{
return new PublishedFragment(contentTypeAlias, dataValues, isPreviewing, managed);
if (propertyType.IsDetachedOrNested == false)
throw new ArgumentException("Property type is neither detached nor nested.", "propertyType");
return new XmlPublishedProperty(propertyType, isPreviewing, value.ToString());
}
#endregion
}
}
}