Files
Umbraco-CMS/src/Umbraco.Web/PublishedCache/PublishedSnapshotServiceBase.cs
2017-10-31 12:48:24 +01:00

37 lines
1.7 KiB
C#

using System.Collections.Generic;
using Umbraco.Core.Models.Membership;
using Umbraco.Web.Cache;
namespace Umbraco.Web.PublishedCache
{
abstract class PublishedSnapshotServiceBase : IPublishedSnapshotService
{
protected PublishedSnapshotServiceBase(IPublishedSnapshotAccessor publishedSnapshotAccessor)
{
PublishedSnapshotAccessor = publishedSnapshotAccessor;
}
public IPublishedSnapshotAccessor PublishedSnapshotAccessor { get; }
// note: NOT setting _publishedSnapshotAccessor.PublishedSnapshot here because it is the
// responsibility of the caller to manage what the 'current' facade is
public abstract IPublishedShapshot CreatePublishedSnapshot(string previewToken);
protected IPublishedShapshot CurrentPublishedShapshot => PublishedSnapshotAccessor.PublishedSnapshot;
public abstract bool EnsureEnvironment(out IEnumerable<string> errors);
public abstract string EnterPreview(IUser user, int contentId);
public abstract void RefreshPreview(string previewToken, int contentId);
public abstract void ExitPreview(string previewToken);
public abstract void Notify(ContentCacheRefresher.JsonPayload[] payloads, out bool draftChanged, out bool publishedChanged);
public abstract void Notify(MediaCacheRefresher.JsonPayload[] payloads, out bool anythingChanged);
public abstract void Notify(ContentTypeCacheRefresher.JsonPayload[] payloads);
public abstract void Notify(DataTypeCacheRefresher.JsonPayload[] payloads);
public abstract void Notify(DomainCacheRefresher.JsonPayload[] payloads);
public virtual void Dispose()
{ }
}
}