Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IUmbracoContext

    Namespace: Umbraco.Cms.Core.Web
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IUmbracoContext

    Properties

    View Source

    CleanedUmbracoUrl

    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...

    View Source

    Content

    Gets the published content cache.

    Declaration
    IPublishedContentCache Content { get; }
    Property Value
    Type Description
    IPublishedContentCache
    View Source

    Domains

    Gets the domains cache.

    Declaration
    IDomainCache Domains { get; }
    Property Value
    Type Description
    IDomainCache
    View Source

    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
    View Source

    IsDebug

    Gets a value indicating whether the request has debugging enabled

    Declaration
    bool IsDebug { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is debug; otherwise, false.

    View Source

    Media

    Gets the published media cache.

    Declaration
    IPublishedMediaCache Media { get; }
    Property Value
    Type Description
    IPublishedMediaCache
    View Source

    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.

    View Source

    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
    View Source

    PublishedRequest

    Gets or sets the PublishedRequest object

    Declaration
    IPublishedRequest PublishedRequest { get; set; }
    Property Value
    Type Description
    IPublishedRequest
    View Source

    PublishedSnapshot

    Gets the published snapshot.

    Declaration
    IPublishedSnapshot PublishedSnapshot { get; }
    Property Value
    Type Description
    IPublishedSnapshot

    Methods

    View Source

    ForcedPreview(Boolean)

    Forces the context into preview

    Declaration
    IDisposable ForcedPreview(bool preview)
    Parameters
    Type Name Description
    System.Boolean preview
    Returns
    Type Description
    IDisposable

    A instance to be disposed to exit the preview context

    • Improve this Doc
    • View Source
    In This Article
    • Properties
      • CleanedUmbracoUrl
      • Content
      • Domains
      • InPreviewMode
      • IsDebug
      • Media
      • ObjectCreated
      • OriginalRequestUrl
      • PublishedRequest
      • PublishedSnapshot
    • Methods
      • ForcedPreview(Boolean)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX