DataWeb
Search Results for

    Show / Hide Table of Contents

    Interface ITemplateStore

    The interface for a template store implementation, which provides CRUD operations for templates.

    Namespace: DataWeb.Templating
    Assembly: DataWeb.Core.dll
    Syntax
    public interface ITemplateStore

    Properties

    Name

    Gets the name of the template store.

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

    Methods

    ConvertStringToStatus(string)

    Converts the given string value to a template status.

    Declaration
    TemplateStatus ConvertStringToStatus(string value)
    Parameters
    Type Name Description
    string value
    Returns
    Type Description
    TemplateStatus

    GetTemplateAsync(TemplateFilter, CancellationToken)

    Gets a template that matches the specified filter.

    Declaration
    Task<Template> GetTemplateAsync(TemplateFilter filter, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TemplateFilter filter

    The TemplateFilter to apply.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<Template>

    The template that matches the specified filter.

    GetTemplateContextsAsync(CancellationToken)

    Gets the contexts for all templates.

    Declaration
    Task<IEnumerable<string>> GetTemplateContextsAsync(CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<IEnumerable<string>>

    An enumerable collection of context strings.

    GetTemplateCountAsync(TemplateFilter, CancellationToken)

    Gets the count of templates that match the specified filter.

    Declaration
    Task<long> GetTemplateCountAsync(TemplateFilter filter, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TemplateFilter filter

    The TemplateFilter to apply.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<long>

    The count of templates that match the specified filter.

    GetTemplatesAsync(TemplateFilter, CancellationToken)

    Gets the templates that match the specified filter.

    Declaration
    Task<IEnumerable<Template>> GetTemplatesAsync(TemplateFilter filter, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TemplateFilter filter

    The TemplateFilter to apply.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<IEnumerable<Template>>

    An enumerable collection of templates.

    GetTemplatesCachedAsync(string, CancellationToken)

    Retrieves all templates from cache.

    Declaration
    Task<IEnumerable<Template>> GetTemplatesCachedAsync(string templateContext, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string templateContext

    The template context.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<IEnumerable<Template>>

    An IEnumerable<T> of Template objects.

    RemoveAsync(string, CancellationToken)

    Removes the template with the specified Id.

    Declaration
    Task RemoveAsync(string id, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string id

    The Id of the template to remove.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task

    A task representing the asynchronous operation.

    SetAsync(Template, CancellationToken)

    Sets the specified template.

    Declaration
    Task SetAsync(Template template, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Template template

    The Template to set.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task

    A task representing the asynchronous operation.

    In this article
    Back to top Generated by DocFX