Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IPublishedCache

    Provides access to cached contents.

    Namespace: Umbraco.Cms.Core.PublishedCache
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IPublishedCache : IXPathNavigable

    Methods

    View Source

    CreateNavigator(Boolean)

    Creates an XPath navigator that can be used to navigate contents.

    Declaration
    XPathNavigator CreateNavigator(bool preview)
    Parameters
    Type Name Description
    System.Boolean preview

    A value indicating whether to consider unpublished content.

    Returns
    Type Description
    System.Xml.XPath.XPathNavigator

    The XPath navigator.

    Remarks

    The value of preview overrides the context.

    The navigator is already a safe clone (no need to clone it again).

    View Source

    CreateNodeNavigator(Int32, Boolean)

    Creates an XPath navigator that can be used to navigate one node.

    Declaration
    XPathNavigator CreateNodeNavigator(int id, bool preview)
    Parameters
    Type Name Description
    System.Int32 id

    The node identifier.

    System.Boolean preview

    A value indicating whether to consider unpublished content.

    Returns
    Type Description
    System.Xml.XPath.XPathNavigator

    The XPath navigator, or null.

    Remarks

    The value of preview overrides the context.

    The navigator is already a safe clone (no need to clone it again).

    Navigates over the node - and only the node, ie no children. Exists only for backward compatibility + transition reasons, we should obsolete that one as soon as possible.

    If the node does not exist, returns null.

    View Source

    GetAtRoot(Boolean, String)

    Gets contents at root.

    Declaration
    IEnumerable<IPublishedContent> GetAtRoot(bool preview, string culture = null)
    Parameters
    Type Name Description
    System.Boolean preview

    A value indicating whether to consider unpublished content.

    System.String culture

    A culture.

    Returns
    Type Description
    IEnumerable<IPublishedContent>

    The contents.

    Remarks

    The value of preview overrides defaults.

    View Source

    GetAtRoot(String)

    Gets contents at root.

    Declaration
    IEnumerable<IPublishedContent> GetAtRoot(string culture = null)
    Parameters
    Type Name Description
    System.String culture

    A culture.

    Returns
    Type Description
    IEnumerable<IPublishedContent>

    The contents.

    Remarks

    Considers published or unpublished content depending on defaults.

    View Source

    GetByContentType(IPublishedContentType)

    Gets contents of a given content type.

    Declaration
    IEnumerable<IPublishedContent> GetByContentType(IPublishedContentType contentType)
    Parameters
    Type Name Description
    IPublishedContentType contentType

    The content type.

    Returns
    Type Description
    IEnumerable<IPublishedContent>

    The contents.

    View Source

    GetById(Guid)

    Gets a content identified by its unique identifier.

    Declaration
    IPublishedContent GetById(Guid contentId)
    Parameters
    Type Name Description
    Guid contentId

    The content unique identifier.

    Returns
    Type Description
    IPublishedContent

    The content, or null.

    Remarks

    Considers published or unpublished content depending on defaults.

    View Source

    GetById(Boolean, Guid)

    Gets a content identified by its unique identifier.

    Declaration
    IPublishedContent GetById(bool preview, Guid contentId)
    Parameters
    Type Name Description
    System.Boolean preview

    A value indicating whether to consider unpublished content.

    Guid contentId

    The content unique identifier.

    Returns
    Type Description
    IPublishedContent

    The content, or null.

    Remarks

    The value of preview overrides defaults.

    View Source

    GetById(Boolean, Int32)

    Gets a content identified by its unique identifier.

    Declaration
    IPublishedContent GetById(bool preview, int contentId)
    Parameters
    Type Name Description
    System.Boolean preview

    A value indicating whether to consider unpublished content.

    System.Int32 contentId

    The content unique identifier.

    Returns
    Type Description
    IPublishedContent

    The content, or null.

    Remarks

    The value of preview overrides defaults.

    View Source

    GetById(Boolean, Udi)

    Gets a content identified by its Udi identifier.

    Declaration
    IPublishedContent GetById(bool preview, Udi contentId)
    Parameters
    Type Name Description
    System.Boolean preview

    A value indicating whether to consider unpublished content.

    Udi contentId

    The content Udi identifier.

    Returns
    Type Description
    IPublishedContent

    The content, or null.

    Remarks

    The value of preview overrides defaults.

    View Source

    GetById(Int32)

    Gets a content identified by its unique identifier.

    Declaration
    IPublishedContent GetById(int contentId)
    Parameters
    Type Name Description
    System.Int32 contentId

    The content unique identifier.

    Returns
    Type Description
    IPublishedContent

    The content, or null.

    Remarks

    Considers published or unpublished content depending on defaults.

    View Source

    GetById(Udi)

    Gets a content identified by its unique identifier.

    Declaration
    IPublishedContent GetById(Udi contentId)
    Parameters
    Type Name Description
    Udi contentId

    The content unique identifier.

    Returns
    Type Description
    IPublishedContent

    The content, or null.

    Remarks

    Considers published or unpublished content depending on defaults.

    View Source

    GetByXPath(Boolean, String, XPathVariable[])

    Gets contents resulting from an XPath query.

    Declaration
    IEnumerable<IPublishedContent> GetByXPath(bool preview, string xpath, params XPathVariable[] vars)
    Parameters
    Type Name Description
    System.Boolean preview

    A value indicating whether to consider unpublished content.

    System.String xpath

    The XPath query.

    XPathVariable[] vars

    Optional XPath variables.

    Returns
    Type Description
    IEnumerable<IPublishedContent>

    The contents.

    Remarks

    The value of preview overrides defaults.

    View Source

    GetByXPath(Boolean, XPathExpression, XPathVariable[])

    Gets contents resulting from an XPath query.

    Declaration
    IEnumerable<IPublishedContent> GetByXPath(bool preview, XPathExpression xpath, params XPathVariable[] vars)
    Parameters
    Type Name Description
    System.Boolean preview

    A value indicating whether to consider unpublished content.

    System.Xml.XPath.XPathExpression xpath

    The XPath query.

    XPathVariable[] vars

    Optional XPath variables.

    Returns
    Type Description
    IEnumerable<IPublishedContent>

    The contents.

    Remarks

    The value of preview overrides defaults.

    View Source

    GetByXPath(String, XPathVariable[])

    Gets contents resulting from an XPath query.

    Declaration
    IEnumerable<IPublishedContent> GetByXPath(string xpath, params XPathVariable[] vars)
    Parameters
    Type Name Description
    System.String xpath

    The XPath query.

    XPathVariable[] vars

    Optional XPath variables.

    Returns
    Type Description
    IEnumerable<IPublishedContent>

    The contents.

    Remarks

    Considers published or unpublished content depending on defaults.

    View Source

    GetByXPath(XPathExpression, XPathVariable[])

    Gets contents resulting from an XPath query.

    Declaration
    IEnumerable<IPublishedContent> GetByXPath(XPathExpression xpath, params XPathVariable[] vars)
    Parameters
    Type Name Description
    System.Xml.XPath.XPathExpression xpath

    The XPath query.

    XPathVariable[] vars

    Optional XPath variables.

    Returns
    Type Description
    IEnumerable<IPublishedContent>

    The contents.

    Remarks

    Considers published or unpublished content depending on defaults.

    View Source

    GetContentType(Guid)

    Gets a content type identified by its alias.

    Declaration
    IPublishedContentType GetContentType(Guid key)
    Parameters
    Type Name Description
    Guid key

    The content type key.

    Returns
    Type Description
    IPublishedContentType

    The content type, or null.

    View Source

    GetContentType(Int32)

    Gets a content type identified by its unique identifier.

    Declaration
    IPublishedContentType GetContentType(int id)
    Parameters
    Type Name Description
    System.Int32 id

    The content type unique identifier.

    Returns
    Type Description
    IPublishedContentType

    The content type, or null.

    View Source

    GetContentType(String)

    Gets a content type identified by its alias.

    Declaration
    IPublishedContentType GetContentType(string alias)
    Parameters
    Type Name Description
    System.String alias

    The content type alias.

    Returns
    Type Description
    IPublishedContentType

    The content type, or null.

    Remarks

    The alias is case-insensitive.

    View Source

    GetSingleByXPath(Boolean, String, XPathVariable[])

    Gets a content resulting from an XPath query.

    Declaration
    IPublishedContent GetSingleByXPath(bool preview, string xpath, params XPathVariable[] vars)
    Parameters
    Type Name Description
    System.Boolean preview

    A value indicating whether to consider unpublished content.

    System.String xpath

    The XPath query.

    XPathVariable[] vars

    Optional XPath variables.

    Returns
    Type Description
    IPublishedContent

    The content, or null.

    Remarks

    The value of preview overrides defaults.

    View Source

    GetSingleByXPath(Boolean, XPathExpression, XPathVariable[])

    Gets a content resulting from an XPath query.

    Declaration
    IPublishedContent GetSingleByXPath(bool preview, XPathExpression xpath, params XPathVariable[] vars)
    Parameters
    Type Name Description
    System.Boolean preview

    A value indicating whether to consider unpublished content.

    System.Xml.XPath.XPathExpression xpath

    The XPath query.

    XPathVariable[] vars

    Optional XPath variables.

    Returns
    Type Description
    IPublishedContent

    The content, or null.

    Remarks

    The value of preview overrides defaults.

    View Source

    GetSingleByXPath(String, XPathVariable[])

    Gets a content resulting from an XPath query.

    Declaration
    IPublishedContent GetSingleByXPath(string xpath, params XPathVariable[] vars)
    Parameters
    Type Name Description
    System.String xpath

    The XPath query.

    XPathVariable[] vars

    Optional XPath variables.

    Returns
    Type Description
    IPublishedContent

    The content, or null.

    Remarks

    Considers published or unpublished content depending on defaults.

    View Source

    GetSingleByXPath(XPathExpression, XPathVariable[])

    Gets a content resulting from an XPath query.

    Declaration
    IPublishedContent GetSingleByXPath(XPathExpression xpath, params XPathVariable[] vars)
    Parameters
    Type Name Description
    System.Xml.XPath.XPathExpression xpath

    The XPath query.

    XPathVariable[] vars

    Optional XPath variables.

    Returns
    Type Description
    IPublishedContent

    The content, or null.

    Remarks

    Considers published or unpublished content depending on defaults.

    View Source

    HasById(Boolean, Int32)

    Gets a value indicating whether the cache contains a specified content.

    Declaration
    bool HasById(bool preview, int contentId)
    Parameters
    Type Name Description
    System.Boolean preview

    A value indicating whether to consider unpublished content.

    System.Int32 contentId

    The content unique identifier.

    Returns
    Type Description
    System.Boolean

    A value indicating whether to the cache contains the specified content.

    Remarks

    The value of preview overrides defaults.

    View Source

    HasById(Int32)

    Gets a value indicating whether the cache contains a specified content.

    Declaration
    bool HasById(int contentId)
    Parameters
    Type Name Description
    System.Int32 contentId

    The content unique identifier.

    Returns
    Type Description
    System.Boolean

    A value indicating whether to the cache contains the specified content.

    Remarks

    Considers published or unpublished content depending on defaults.

    View Source

    HasContent()

    Gets a value indicating whether the cache contains published content.

    Declaration
    bool HasContent()
    Returns
    Type Description
    System.Boolean

    A value indicating whether the cache contains published content.

    Remarks

    Considers published or unpublished content depending on defaults.

    View Source

    HasContent(Boolean)

    Gets a value indicating whether the cache contains published content.

    Declaration
    bool HasContent(bool preview)
    Parameters
    Type Name Description
    System.Boolean preview

    A value indicating whether to consider unpublished content.

    Returns
    Type Description
    System.Boolean

    A value indicating whether the cache contains published content.

    Remarks

    The value of preview overrides defaults.

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • CreateNavigator(Boolean)
      • CreateNodeNavigator(Int32, Boolean)
      • GetAtRoot(Boolean, String)
      • GetAtRoot(String)
      • GetByContentType(IPublishedContentType)
      • GetById(Guid)
      • GetById(Boolean, Guid)
      • GetById(Boolean, Int32)
      • GetById(Boolean, Udi)
      • GetById(Int32)
      • GetById(Udi)
      • GetByXPath(Boolean, String, XPathVariable[])
      • GetByXPath(Boolean, XPathExpression, XPathVariable[])
      • GetByXPath(String, XPathVariable[])
      • GetByXPath(XPathExpression, XPathVariable[])
      • GetContentType(Guid)
      • GetContentType(Int32)
      • GetContentType(String)
      • GetSingleByXPath(Boolean, String, XPathVariable[])
      • GetSingleByXPath(Boolean, XPathExpression, XPathVariable[])
      • GetSingleByXPath(String, XPathVariable[])
      • GetSingleByXPath(XPathExpression, XPathVariable[])
      • HasById(Boolean, Int32)
      • HasById(Int32)
      • HasContent()
      • HasContent(Boolean)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX