Search Results for

    Show / Hide Table of Contents
    View Source

    Class PublishedContentQueryAccessor

    Provides access to the IPublishedContentQuery service, enabling queries against published content within Umbraco. Typically used to retrieve or interact with published content data in a decoupled manner.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class PublishedContentQueryAccessor : IPublishedContentQueryAccessor

    Constructors

    View Source

    PublishedContentQueryAccessor(IScopedServiceProvider)

    Initializes a new instance of the PublishedContentQueryAccessor class with the specified scoped service provider.

    Declaration
    public PublishedContentQueryAccessor(IScopedServiceProvider scopedServiceProvider)
    Parameters
    Type Name Description
    IScopedServiceProvider scopedServiceProvider

    The IScopedServiceProvider used to resolve services within the current scope.

    Methods

    View Source

    TryGetValue(out IPublishedContentQuery)

    Attempts to get the current IPublishedContentQuery instance.

    Declaration
    public bool TryGetValue(out IPublishedContentQuery publishedContentQuery)
    Parameters
    Type Name Description
    IPublishedContentQuery publishedContentQuery

    When this method returns, contains the IPublishedContentQuery instance if available; otherwise, null.

    Returns
    Type Description
    bool

    true if the IPublishedContentQuery instance was successfully retrieved; otherwise, false.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX