DataWeb
Search Results for

    Show / Hide Table of Contents

    Interface IAppSettingService

    Provides methods for managing application settings.

    Namespace: DataWeb.Setting
    Assembly: DataWeb.Core.dll
    Syntax
    public interface IAppSettingService

    Methods

    ExistsAsync(string, CancellationToken)

    Determines whether an application setting with the specified name exists.

    Declaration
    Task<bool> ExistsAsync(string name, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string name

    The name of the application setting.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<bool>

    True if an application setting with the specified name exists; otherwise, false.

    GetSettingAsync(string, CancellationToken)

    Retrieves the value of the application setting with the specified name.

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

    The name of the application setting.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<string>

    The value of the application setting.

    GetSettingsAsync(CancellationToken)

    Retrieves all application settings.

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

    A collection of AppSetting objects.

    RemoveAsync(string, CancellationToken)

    Removes the application setting with the specified name.

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

    The name of the application setting.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task

    SetAsync(string, string, CancellationToken)

    Sets the value of an application setting with the specified name.

    Declaration
    Task SetAsync(string name, string value, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string name

    The name of the application setting.

    string value

    The value of the application setting.

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