DataWeb
Search Results for

    Show / Hide Table of Contents

    Interface ITemplateService

    Interface for managing templates, including retrieving, updating, and caching templates.

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

    Methods

    ConvertStatus(string)

    Converts the given value to a template status.

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

    GetTemplateAsync(TemplateFilter, CancellationToken)

    Gets a template matching the specified filter.

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

    The TemplateFilter to apply to the templates.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<Template>

    The template matching the specified filter, or null if no match was found.

    GetTemplateContextsAsync(CancellationToken)

    Gets all the distinct template contexts in the system.

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

    A list of all the distinct template contexts in the system.

    GetTemplateCountAsync(TemplateFilter, CancellationToken)

    Gets the count of templates matching the specified filter.

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

    The TemplateFilter to apply to the templates.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<long>

    The count of templates matching the specified filter.

    GetTemplatesAsync(TemplateFilter, CancellationToken)

    Gets the templates matching the specified filter.

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

    The TemplateFilter to apply to the templates.

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

    The templates matching the specified filter.

    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.

    RemoveTemplateAsync(string, CancellationToken)

    Removes the template with the specified Id.

    Declaration
    Task RemoveTemplateAsync(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.

    SetTemplateAsync(Template, CancellationToken)

    Sets the specified template in the store.

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

    The Template to set in the store.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task
    In this article
    Back to top Generated by DocFX