Search Results for

    Show / Hide Table of Contents
    View Source

    Class FurthestAncestorOrSelfDynamicRootQueryStep

    A query step that finds the furthest (topmost) ancestor or self matching the specified document type criteria. This step traverses up the content tree from the origin and returns the matching node furthest from the origin.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.DynamicRoot.QuerySteps
    Assembly: Umbraco.Core.dll
    Syntax
    public class FurthestAncestorOrSelfDynamicRootQueryStep : IDynamicRootQueryStep

    Constructors

    View Source

    FurthestAncestorOrSelfDynamicRootQueryStep(ICoreScopeProvider, IDynamicRootRepository)

    Initializes a new instance of the FurthestAncestorOrSelfDynamicRootQueryStep class.

    Declaration
    public FurthestAncestorOrSelfDynamicRootQueryStep(ICoreScopeProvider scopeProvider, IDynamicRootRepository nodeFilterRepository)
    Parameters
    Type Name Description
    ICoreScopeProvider scopeProvider

    The scope provider for database operations.

    IDynamicRootRepository nodeFilterRepository

    The repository used to query for ancestors matching the filter criteria.

    Properties

    View Source

    SupportedDirectionAlias

    Gets the direction alias that this query step supports (e.g., "NearestAncestorOrSelf", "FurthestDescendantOrSelf").

    Declaration
    public virtual string SupportedDirectionAlias { get; set; }
    Property Value
    Type Description
    string

    Methods

    View Source

    ExecuteAsync(ICollection<Guid>, DynamicRootQueryStep)

    Executes the query step on the specified origin content items.

    Declaration
    public Task<Attempt<ICollection<Guid>>> ExecuteAsync(ICollection<Guid> origins, DynamicRootQueryStep filter)
    Parameters
    Type Name Description
    ICollection<Guid> origins

    The collection of content keys to use as starting points for this query step.

    DynamicRootQueryStep filter

    The query step configuration containing the alias and document type filter criteria.

    Returns
    Type Description
    Task<Attempt<ICollection<Guid>>>

    A task representing the asynchronous operation, containing an Attempt<TResult> with the filtered content keys. Returns a failed attempt if this query step does not support the specified alias.

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