Search Results for

    Show / Hide Table of Contents
    View Source

    Class PublishedRequestOld

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Routing
    Assembly: Umbraco.Core.dll
    Syntax
    public class PublishedRequestOld

    Constructors

    View Source

    PublishedRequestOld(IPublishedRouter, IUmbracoContext, IOptions<WebRoutingSettings>, Nullable<Uri>)

    Initializes a new instance of the PublishedRequest class.

    Declaration
    public PublishedRequestOld(IPublishedRouter publishedRouter, IUmbracoContext umbracoContext, IOptions<WebRoutingSettings> webRoutingSettings, Uri? uri = null)
    Parameters
    Type Name Description
    IPublishedRouter publishedRouter
    IUmbracoContext umbracoContext
    IOptions<WebRoutingSettings> webRoutingSettings
    System.Nullable<Uri> uri

    Properties

    View Source

    CacheabilityNoCache

    Declaration
    public bool CacheabilityNoCache { get; set; }
    Property Value
    Type Description
    System.Boolean
    View Source

    CacheExtensions

    Gets or sets a list of Extensions to append to the Response.Cache object.

    Declaration
    public List<string> CacheExtensions { get; set; }
    Property Value
    Type Description
    List<System.String>
    View Source

    Culture

    Gets or sets the content request's culture.

    Declaration
    public CultureInfo Culture { get; set; }
    Property Value
    Type Description
    System.Globalization.CultureInfo
    View Source

    Domain

    Gets or sets the content request's domain.

    Declaration
    public DomainAndUri Domain { get; set; }
    Property Value
    Type Description
    DomainAndUri
    Remarks

    Is a DomainAndUri object ie a standard Domain plus the fully qualified uri. For example, the Domain may contain "example.com" whereas the Uri will be fully qualified eg "http://example.com/";.

    View Source

    HasDomain

    Gets a value indicating whether the content request has a domain.

    Declaration
    public bool HasDomain { get; }
    Property Value
    Type Description
    System.Boolean
    View Source

    Headers

    Gets or sets a dictionary of Headers to append to the Response object.

    Declaration
    public Dictionary<string, string> Headers { get; set; }
    Property Value
    Type Description
    Umbraco.Cms.Core.Dictionary<System.String, System.String>
    View Source

    IgnorePublishedContentCollisions

    Gets or sets a value indicating whether the Umbraco Backoffice should ignore a collision for this request.

    Declaration
    public bool IgnorePublishedContentCollisions { get; set; }
    Property Value
    Type Description
    System.Boolean
    View Source

    InitialPublishedContent

    Gets the initial requested content.

    Declaration
    public IPublishedContent InitialPublishedContent { get; }
    Property Value
    Type Description
    IPublishedContent
    Remarks

    The initial requested content is the content that was found by the finders, before anything such as 404, redirect... took place.

    View Source

    Is404

    Gets or sets a value indicating whether the requested content could not be found.

    Declaration
    public bool Is404 { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    This is set in the PublishedContentRequestBuilder and can also be used in custom content finders or Prepared event handlers, where we want to allow developers to indicate a request is 404 but not to cancel it.

    View Source

    IsInitialPublishedContent

    Gets value indicating whether the current published content is the initial one.

    Declaration
    public bool IsInitialPublishedContent { get; }
    Property Value
    Type Description
    System.Boolean
    View Source

    IsInternalRedirectPublishedContent

    Gets or sets a value indicating whether the current published content has been obtained from the initial published content following internal redirections exclusively.

    Declaration
    public bool IsInternalRedirectPublishedContent { get; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    Used by PublishedContentRequestEngine.FindTemplate() to figure out whether to apply the internal redirect or not, when content is not the initial content.

    View Source

    IsRedirect

    Gets a value indicating whether the content request triggers a redirect (permanent or not).

    Declaration
    public bool IsRedirect { get; }
    Property Value
    Type Description
    System.Boolean
    View Source

    IsRedirectPermanent

    Gets or sets a value indicating whether the redirect is permanent.

    Declaration
    public bool IsRedirectPermanent { get; }
    Property Value
    Type Description
    System.Boolean
    View Source

    RedirectUrl

    Gets or sets the URL to redirect to, when the content request triggers a redirect.

    Declaration
    public string RedirectUrl { get; }
    Property Value
    Type Description
    System.String
    View Source

    ResponseStatusCode

    Gets or sets the content request http response status code.

    Declaration
    public int ResponseStatusCode { get; }
    Property Value
    Type Description
    System.Int32
    Remarks

    Does not actually set the http response status code, only registers that the response should use the specified code. The code will or will not be used, in due time.

    View Source

    ResponseStatusDescription

    Gets or sets the content request http response status description.

    Declaration
    public string ResponseStatusDescription { get; }
    Property Value
    Type Description
    System.String
    Remarks

    Does not actually set the http response status description, only registers that the response should use the specified description. The description will or will not be used, in due time.

    View Source

    Template

    Gets or sets the template model to use to display the requested content.

    Declaration
    public ITemplate Template { get; }
    Property Value
    Type Description
    ITemplate
    View Source

    TemplateAlias

    Gets the alias of the template to use to display the requested content.

    Declaration
    public string TemplateAlias { get; }
    Property Value
    Type Description
    System.String
    View Source

    UmbracoContext

    Gets the UmbracoContext.

    Declaration
    public IUmbracoContext UmbracoContext { get; }
    Property Value
    Type Description
    IUmbracoContext
    View Source

    Uri

    Gets or sets the cleaned up Uri used for routing.

    Declaration
    public Uri Uri { get; }
    Property Value
    Type Description
    Uri
    Remarks

    The cleaned up Uri has no virtual directory, no trailing slash, no .aspx extension, etc.

    Methods

    View Source

    EnsureWriteable()

    Declaration
    public void EnsureWriteable()
    View Source

    SetInternalRedirectPublishedContent(IPublishedContent)

    Sets the requested content, following an internal redirect.

    Declaration
    public void SetInternalRedirectPublishedContent(IPublishedContent content)
    Parameters
    Type Name Description
    IPublishedContent content

    The requested content.

    Remarks

    Depending on UmbracoSettings.InternalRedirectPreservesTemplate, will preserve or reset the template, if any.

    View Source

    SetIsInitialPublishedContent()

    Indicates that the current PublishedContent is the initial one.

    Declaration
    public void SetIsInitialPublishedContent()
    View Source

    SetRedirect(String)

    Indicates that the content request should trigger a redirect (302).

    Declaration
    public void SetRedirect(string url)
    Parameters
    Type Name Description
    System.String url

    The URL to redirect to.

    Remarks

    Does not actually perform a redirect, only registers that the response should redirect. Redirect will or will not take place in due time.

    View Source

    SetRedirect(String, Int32)

    Indicates that the content request should trigger a redirect, with a specified status code.

    Declaration
    public void SetRedirect(string url, int status)
    Parameters
    Type Name Description
    System.String url

    The URL to redirect to.

    System.Int32 status

    The status code (300-308).

    Remarks

    Does not actually perform a redirect, only registers that the response should redirect. Redirect will or will not take place in due time.

    View Source

    SetRedirectPermanent(String)

    Indicates that the content request should trigger a permanent redirect (301).

    Declaration
    public void SetRedirectPermanent(string url)
    Parameters
    Type Name Description
    System.String url

    The URL to redirect to.

    Remarks

    Does not actually perform a redirect, only registers that the response should redirect. Redirect will or will not take place in due time.

    View Source

    SetResponseStatus(Int32, String)

    Sets the http response status code, along with an optional associated description.

    Declaration
    public void SetResponseStatus(int code, string description = null)
    Parameters
    Type Name Description
    System.Int32 code

    The http status code.

    System.String description

    The description.

    Remarks

    Does not actually set the http response status code and description, only registers that the response should use the specified code and description. The code and description will or will not be used, in due time.

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • PublishedRequestOld(IPublishedRouter, IUmbracoContext, IOptions<WebRoutingSettings>, Nullable<Uri>)
    • Properties
      • CacheabilityNoCache
      • CacheExtensions
      • Culture
      • Domain
      • HasDomain
      • Headers
      • IgnorePublishedContentCollisions
      • InitialPublishedContent
      • Is404
      • IsInitialPublishedContent
      • IsInternalRedirectPublishedContent
      • IsRedirect
      • IsRedirectPermanent
      • RedirectUrl
      • ResponseStatusCode
      • ResponseStatusDescription
      • Template
      • TemplateAlias
      • UmbracoContext
      • Uri
    • Methods
      • EnsureWriteable()
      • SetInternalRedirectPublishedContent(IPublishedContent)
      • SetIsInitialPublishedContent()
      • SetRedirect(String)
      • SetRedirect(String, Int32)
      • SetRedirectPermanent(String)
      • SetResponseStatus(Int32, String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX