Merge branch v8/dev into v8/feature/5170-IPublishedContent

This commit is contained in:
Stephan
2019-04-23 10:47:40 +02:00
104 changed files with 933 additions and 463 deletions

View File

@@ -236,6 +236,18 @@ namespace Umbraco.Web.PublishedCache.NuCache
return GetNodePublishedContent(node, preview);
}
public override IPublishedContent GetById(bool preview, Udi contentId)
{
var guidUdi = contentId as GuidUdi;
if (guidUdi == null)
throw new ArgumentException($"Udi must be of type {typeof(GuidUdi).Name}.", nameof(contentId));
if (guidUdi.EntityType != Constants.UdiEntityType.Document)
throw new ArgumentException($"Udi entity type must be \"{Constants.UdiEntityType.Document}\".", nameof(contentId));
return GetById(preview, guidUdi.Guid);
}
public override bool HasById(bool preview, int contentId)
{
var n = _snapshot.Get(contentId);