Interface IAppSettingStore
Defines the interface for a store that provides CRUD operations for application settings.
Namespace: DataWeb.Setting
Assembly: DataWeb.Core.dll
Syntax
public interface IAppSettingStore
Properties
Name
Gets the name of the store.
Declaration
string Name { get; }
Property Value
Type |
---|
string |
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 setting to check. |
Returns
Type | Description |
---|---|
Task<bool> | true if the setting exists; otherwise, false. |
GetSettingAsync(string)
Gets the value of an application setting with the specified name.
Declaration
Task<string> GetSettingAsync(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the setting to retrieve. |
Returns
Type | Description |
---|---|
Task<string> | The value of the setting. |
GetSettingsAsync()
Gets all application settings.
Declaration
Task<IEnumerable<AppSetting>> GetSettingsAsync()
Returns
Type | Description |
---|---|
Task<IEnumerable<AppSetting>> | A collection of AppSetting objects. |
RemoveAsync(string)
Removes an application setting with the specified name.
Declaration
Task RemoveAsync(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the setting to remove. |
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 setting to set. |
string | value | The value of the setting to set. |
Returns
Type | Description |
---|---|
Task |