using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Umbraco.Core.Models;
namespace Umbraco.Web.PublishedCache
{
///
/// Provides access to cached contents in a specified context.
///
internal abstract class ContextualPublishedCache
{
protected readonly UmbracoContext UmbracoContext;
protected ContextualPublishedCache(UmbracoContext umbracoContext)
{
UmbracoContext = umbracoContext;
}
///
/// Gets a content identified by its unique identifier.
///
/// The content unique identifier.
/// The content, or null.
public abstract IPublishedContent GetById(int contentId);
///
/// Gets contents at root.
///
/// The contents.
public abstract IEnumerable GetAtRoot();
///
/// Gets a content resulting from an XPath query.
///
/// The XPath query.
/// Optional XPath variables.
/// The content, or null.
public abstract IPublishedContent GetSingleByXPath(string xpath, Core.Xml.XPathVariable[] vars);
///
/// Gets contents resulting from an XPath query.
///
/// The XPath query.
/// Optional XPath variables.
/// The contents.
public abstract IEnumerable GetByXPath(string xpath, Core.Xml.XPathVariable[] vars);
}
}