using System;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Web.PublishedCache;
using Umbraco.Web.Routing;
using Umbraco.Web.Security;
namespace Umbraco.Web
{
public interface IUmbracoContext
{
///
/// This is used internally for performance calculations, the ObjectCreated DateTime is set as soon as this
/// object is instantiated which in the web site is created during the BeginRequest phase.
/// We can then determine complete rendering time from that.
///
DateTime ObjectCreated { get; }
///
/// Gets the WebSecurity class
///
IWebSecurity Security { get; }
///
/// Gets the uri that is handled by ASP.NET after server-side rewriting took place.
///
Uri OriginalRequestUrl { get; }
///
/// Gets the cleaned up url that is handled by Umbraco.
///
/// That is, lowercase, no trailing slash after path, no .aspx...
Uri CleanedUmbracoUrl { get; }
///
/// Gets the published snapshot.
///
IPublishedSnapshot PublishedSnapshot { get; }
///
/// Gets the published content cache.
///
IPublishedContentCache Content { get; }
///
/// Gets the published media cache.
///
IPublishedMediaCache Media { get; }
///
/// Gets the domains cache.
///
IDomainCache Domains { get; }
///
/// Boolean value indicating whether the current request is a front-end umbraco request
///
bool IsFrontEndUmbracoRequest { get; }
///
/// Gets/sets the PublishedRequest object
///
IPublishedRequest PublishedRequest { get; set; }
///
/// Gets the variation context accessor.
///
IVariationContextAccessor VariationContextAccessor { get; }
///
/// Gets a value indicating whether the request has debugging enabled
///
/// true if this instance is debug; otherwise, false.
bool IsDebug { get; }
///
/// Determines whether the current user is in a preview mode and browsing the site (ie. not in the admin UI)
///
bool InPreviewMode { get; }
IDisposable ForcedPreview(bool preview);
void Dispose();
}
}