Interface IUmbracoContext
Namespace: Umbraco.Cms.Core.Web
Assembly: Umbraco.Core.dll
Syntax
public interface IUmbracoContext
Properties
View SourceCleanedUmbracoUrl
Gets the cleaned up url that is handled by Umbraco.
Declaration
Uri CleanedUmbracoUrl { get; }
Property Value
| Type | Description |
|---|---|
| Uri |
Remarks
That is, lowercase, no trailing slash after path, no .aspx...
Content
Gets the published content cache.
Declaration
IPublishedContentCache Content { get; }
Property Value
| Type | Description |
|---|---|
| IPublishedContentCache |
Domains
Gets the domains cache.
Declaration
IDomainCache Domains { get; }
Property Value
| Type | Description |
|---|---|
| IDomainCache |
InPreviewMode
Gets a value indicating whether the current user is in a preview mode and browsing the site (ie. not in the admin UI)
Declaration
bool InPreviewMode { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsDebug
Gets a value indicating whether the request has debugging enabled
Declaration
bool IsDebug { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Media
Gets the published media cache.
Declaration
IPublishedMediaCache Media { get; }
Property Value
| Type | Description |
|---|---|
| IPublishedMediaCache |
ObjectCreated
Gets the DateTime this instance was created.
Declaration
DateTime ObjectCreated { get; }
Property Value
| Type | Description |
|---|---|
| DateTime |
Remarks
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.
OriginalRequestUrl
Gets the uri that is handled by ASP.NET after server-side rewriting took place.
Declaration
Uri OriginalRequestUrl { get; }
Property Value
| Type | Description |
|---|---|
| Uri |
PublishedRequest
Gets or sets the PublishedRequest object
Declaration
IPublishedRequest PublishedRequest { get; set; }
Property Value
| Type | Description |
|---|---|
| IPublishedRequest |
PublishedSnapshot
Gets the published snapshot.
Declaration
IPublishedSnapshot PublishedSnapshot { get; }
Property Value
| Type | Description |
|---|---|
| IPublishedSnapshot |
Methods
View SourceForcedPreview(Boolean)
Forces the context into preview
Declaration
IDisposable ForcedPreview(bool preview)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | preview |
Returns
| Type | Description |
|---|---|
| IDisposable | A |