DataWeb
Search Results for

    Show / Hide Table of Contents

    Class SectionStore

    Inheritance
    object
    SectionStore
    Implements
    ISectionStore
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: DataWeb.Structure.SqlServer
    Assembly: DataWeb.Data.SqlServer.dll
    Syntax
    public class SectionStore : ISectionStore

    Constructors

    SectionStore(ISqlHelper, ICacheService)

    Declaration
    public SectionStore(ISqlHelper sqlHelper, ICacheService cacheService)
    Parameters
    Type Name Description
    ISqlHelper sqlHelper
    ICacheService cacheService

    Properties

    Name

    Gets the name of the store.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    string

    Methods

    GetAreaSectionsCachedAsync(string, PublishMode, CancellationToken)

    Retrieves sections for a specific area with caching based on AreaIdMaster, PublishMode and current culture.

    Declaration
    public Task<IEnumerable<SectionData>> GetAreaSectionsCachedAsync(string areaIdMaster, PublishMode publishMode = PublishMode.Preview, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string areaIdMaster

    The unique identifier of the area to retrieve sections for.

    PublishMode publishMode

    The publish mode to filter sections (Preview or Published).

    CancellationToken cancellationToken

    Cancellation token.

    Returns
    Type Description
    Task<IEnumerable<SectionData>>

    A cached collection of SectionData objects belonging to the specified area.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when areaIdMaster is null or empty.

    GetElementSectionsCachedAsync(string, PublishMode, CancellationToken)

    Retrieves sections for a specific element with caching based on ElementIdMaster, PublishMode and current culture.

    Declaration
    public Task<IEnumerable<SectionData>> GetElementSectionsCachedAsync(string elementIdMaster, PublishMode publishMode = PublishMode.Preview, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string elementIdMaster

    The unique identifier of the element to retrieve sections for.

    PublishMode publishMode

    The publish mode to filter sections (Preview or Published).

    CancellationToken cancellationToken

    Cancellation token.

    Returns
    Type Description
    Task<IEnumerable<SectionData>>

    A cached collection of SectionData objects belonging to the specified element.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when elementIdMaster is null or empty.

    GetSectionAsync(SectionFilter, CancellationToken)

    Retrieves a single section matching the specified filter criteria.

    Declaration
    public Task<SectionData> GetSectionAsync(SectionFilter filter, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    SectionFilter filter

    The filter criteria to apply when retrieving the section.

    CancellationToken cancellationToken

    Cancellation token.

    Returns
    Type Description
    Task<SectionData>

    The first SectionData matching the filter, or null if no match found.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when filter is null.

    GetSectionCachedAsync(string, CancellationToken)

    Retrieves a single section by name with caching based on current culture.

    Declaration
    public Task<SectionData> GetSectionCachedAsync(string name, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string name

    The unique name of the section to retrieve.

    CancellationToken cancellationToken

    Cancellation token.

    Returns
    Type Description
    Task<SectionData>

    The cached SectionData with the specified name, or null if not found.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when name is null or empty.

    GetSectionsAsync(SectionFilter, CancellationToken)

    Retrieves sections matching the specified filter criteria with culture-aware localization.

    Declaration
    public Task<IEnumerable<SectionData>> GetSectionsAsync(SectionFilter filter, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    SectionFilter filter

    The filter criteria including Name, AreaIdMaster, ElementIdMaster, Count, and PublishMode.

    CancellationToken cancellationToken

    Cancellation token.

    Returns
    Type Description
    Task<IEnumerable<SectionData>>

    A collection of SectionData objects with parsed JSON settings and localized titles.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when filter is null.

    GetSectionsCachedAsync(PublishMode, CancellationToken)

    Retrieves all sections with caching based on PublishMode and current culture.

    Declaration
    public Task<IEnumerable<SectionData>> GetSectionsCachedAsync(PublishMode publishMode = PublishMode.Preview, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    PublishMode publishMode

    The publish mode to filter sections (Preview or Published).

    CancellationToken cancellationToken

    Cancellation token.

    Returns
    Type Description
    Task<IEnumerable<SectionData>>

    A cached collection of all SectionData objects.

    Implements

    ISectionStore
    In this article
    Back to top Generated by DocFX