Search Results for

    Show / Hide Table of Contents
    View Source

    Class ApiContentResponseBuilder

    Default implementation of IApiContentResponseBuilder that builds content response objects for the Delivery API.

    Inheritance
    object
    ApiContentBuilderBase<IApiContentResponse>
    Namespace: Umbraco.Cms.Core.DeliveryApi
    Assembly: Umbraco.Core.dll
    Syntax
    public class ApiContentResponseBuilder : ApiContentBuilderBase<IApiContentResponse>, IApiContentResponseBuilder

    Constructors

    View Source

    ApiContentResponseBuilder(IApiContentNameProvider, IApiContentRouteBuilder, IOutputExpansionStrategyAccessor, IVariationContextAccessor)

    Initializes a new instance of the ApiContentResponseBuilder class.

    Declaration
    public ApiContentResponseBuilder(IApiContentNameProvider apiContentNameProvider, IApiContentRouteBuilder apiContentRouteBuilder, IOutputExpansionStrategyAccessor outputExpansionStrategyAccessor, IVariationContextAccessor variationContextAccessor)
    Parameters
    Type Name Description
    IApiContentNameProvider apiContentNameProvider

    The API content name provider.

    IApiContentRouteBuilder apiContentRouteBuilder

    The API content route builder.

    IOutputExpansionStrategyAccessor outputExpansionStrategyAccessor

    The output expansion strategy accessor.

    IVariationContextAccessor variationContextAccessor

    The variation context accessor.

    Methods

    View Source

    Create(IPublishedContent, string, IApiContentRoute, IDictionary<string, object?>)

    Creates an API content instance from the specified parameters.

    Declaration
    protected override IApiContentResponse Create(IPublishedContent content, string name, IApiContentRoute route, IDictionary<string, object?> properties)
    Parameters
    Type Name Description
    IPublishedContent content

    The published content.

    string name

    The name of the content.

    IApiContentRoute route

    The route of the content.

    IDictionary<string, object> properties

    The properties of the content.

    Returns
    Type Description
    IApiContentResponse

    An API content instance.

    View Source

    GetCultures(IPublishedContent)

    Gets the available culture routes for the specified content.

    Declaration
    protected virtual IDictionary<string, IApiContentRoute> GetCultures(IPublishedContent content)
    Parameters
    Type Name Description
    IPublishedContent content

    The published content to get culture routes for.

    Returns
    Type Description
    IDictionary<string, IApiContentRoute>

    A dictionary of culture codes to their corresponding routes.

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