2016-05-27 14:26:28 +02:00
|
|
|
|
using Umbraco.Core.Models.PublishedContent;
|
|
|
|
|
|
using Umbraco.Web.PublishedCache.NuCache.DataSource;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Web.PublishedCache.NuCache
|
|
|
|
|
|
{
|
|
|
|
|
|
// what's needed to actually build a content node
|
2017-07-12 14:09:31 +02:00
|
|
|
|
internal struct ContentNodeKit
|
2016-05-27 14:26:28 +02:00
|
|
|
|
{
|
|
|
|
|
|
public ContentNode Node;
|
|
|
|
|
|
public int ContentTypeId;
|
|
|
|
|
|
public ContentData DraftData;
|
|
|
|
|
|
public ContentData PublishedData;
|
|
|
|
|
|
|
2016-05-30 19:54:36 +02:00
|
|
|
|
public bool IsEmpty => Node == null;
|
2016-05-27 14:26:28 +02:00
|
|
|
|
|
2016-05-30 19:54:36 +02:00
|
|
|
|
public void Build(PublishedContentType contentType, IFacadeAccessor facadeAccessor)
|
2016-05-27 14:26:28 +02:00
|
|
|
|
{
|
2016-05-30 19:54:36 +02:00
|
|
|
|
Node.SetContentTypeAndData(contentType, DraftData, PublishedData, facadeAccessor);
|
2016-05-27 14:26:28 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|