Interface IAppSettingService
Provides methods for managing application settings.
Namespace: DataWeb.Setting
Assembly: DataWeb.Core.dll
Syntax
public interface IAppSettingService
Methods
ExistsAsync(string)
Determines whether an application setting with the specified name exists.
Declaration
Task<bool> ExistsAsync(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the application setting. |
Returns
Type | Description |
---|---|
Task<bool> | True if an application setting with the specified name exists; otherwise, false. |
GetSettingAsync(string)
Retrieves the value of the application setting with the specified name.
Declaration
Task<string> GetSettingAsync(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the application setting. |
Returns
Type | Description |
---|---|
Task<string> | The value of the application setting. |
GetSettingsAsync()
Retrieves all application settings.
Declaration
Task<IEnumerable<AppSetting>> GetSettingsAsync()
Returns
Type | Description |
---|---|
Task<IEnumerable<AppSetting>> | A collection of AppSetting objects. |
RemoveAsync(string)
Removes the application setting with the specified name.
Declaration
Task RemoveAsync(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the application setting. |
Returns
Type | Description |
---|---|
Task |
SetAsync(string, string)
Sets the value of an application setting with the specified name.
Declaration
Task SetAsync(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the application setting. |
string | value | The value of the application setting. |
Returns
Type | Description |
---|---|
Task |