UmbracoContext
Class that encapsulates Umbraco information of a specific HTTP request
Gets the current Umbraco Context.
Gets the current ApplicationContext
Gets or sets the published content cache.
Exposes the HttpContext for the current request
Determines whether the current user is in a preview mode and browsing the site (ie. not in the admin UI)
Gets a value indicating whether the request has debugging enabled
Boolean value indicating whether the current request is a front-end umbraco request
Gets or sets the published media cache.
Gets the current page ID, or null if no page ID is available (e.g. a custom page).
Gets/sets the PublishedContentRequest object
Gets/sets the RoutingContext object
Gets the WebSecurity class
Gets the current logged in Umbraco user (editor).
A shortcut to the UmbracoContext's RoutingContext's NiceUrlProvider
public static UmbracoContext CreateContext(HttpContextBase httpContext, ApplicationContext applicationContext, WebSecurity webSecurity, IUmbracoSettingsSection umbracoSettings, IEnumerable<IUrlProvider> urlProviders, bool? preview)
Creates a standalone UmbracoContext instance
public static UmbracoContext EnsureContext(HttpContextBase httpContext, ApplicationContext applicationContext, WebSecurity webSecurity)
public static UmbracoContext EnsureContext(HttpContextBase httpContext, ApplicationContext applicationContext)
public static UmbracoContext EnsureContext(HttpContextBase httpContext, ApplicationContext applicationContext, bool replaceContext)
public static UmbracoContext EnsureContext(HttpContextBase httpContext, ApplicationContext applicationContext, WebSecurity webSecurity, bool replaceContext)
public static UmbracoContext EnsureContext(HttpContextBase httpContext, ApplicationContext applicationContext, WebSecurity webSecurity, bool replaceContext, bool? preview)
public static UmbracoContext EnsureContext(HttpContextBase httpContext, ApplicationContext applicationContext, WebSecurity webSecurity, IUmbracoSettingsSection umbracoSettings, IEnumerable<IUrlProvider> urlProviders, bool replaceContext, bool? preview = default)
This is a helper method which is called to ensure that the singleton context is created