Interface IUserSettingStore
Provides an interface for a user settings store.
Namespace: DataWeb.Identity
Assembly: DataWeb.Core.dll
Syntax
public interface IUserSettingStore
Properties
Name
Gets the name of the store.
Declaration
string Name { get; }
Property Value
Type |
---|
string |
Methods
ExistsAsync(string, string, string)
Determines whether a specific user setting exists for a given user, setting name, and navigation path.
Declaration
Task<bool> ExistsAsync(string userIdMaster, string name, string navigationPath = null)
Parameters
Type | Name | Description |
---|---|---|
string | userIdMaster | The user Id. |
string | name | The name of the setting. |
string | navigationPath | The navigation path. |
Returns
Type | Description |
---|---|
Task<bool> | true if the setting exists; otherwise, false. |
GetSettingAsync(string, string, string)
Retrieves a specific user setting for a given user, setting name, and navigation path.
Declaration
Task<string> GetSettingAsync(string userIdMaster, string name, string navigationPath = null)
Parameters
Type | Name | Description |
---|---|---|
string | userIdMaster | The user Id. |
string | name | The name of the setting. |
string | navigationPath | The navigation path. |
Returns
Type | Description |
---|---|
Task<string> | The value of the setting, or null if the setting does not exist. |
GetSettingsAsync(string, string)
Retrieves the user settings for a given user and navigation path.
Declaration
Task<IEnumerable<UserSetting>> GetSettingsAsync(string userIdMaster, string navigationPath = null)
Parameters
Type | Name | Description |
---|---|---|
string | userIdMaster | The user Id. |
string | navigationPath | The navigation path. |
Returns
Type | Description |
---|---|
Task<IEnumerable<UserSetting>> | The user settings. |
RemoveAllAsync(string)
Removes all user settings for a given user.
Declaration
Task RemoveAllAsync(string userIdMaster)
Parameters
Type | Name | Description |
---|---|---|
string | userIdMaster | The user Id. |
Returns
Type | Description |
---|---|
Task | A task representing the operation. |
RemoveAsync(string, string, string)
Removes a specific user setting for a given user, setting name, and navigation path.
Declaration
Task RemoveAsync(string userIdMaster, string name, string navigationPath = null)
Parameters
Type | Name | Description |
---|---|---|
string | userIdMaster | The user Id. |
string | name | The name of the setting. |
string | navigationPath | The navigation path. |
Returns
Type | Description |
---|---|
Task | A task representing the operation. |
SetAsync(string, string, string, string)
Sets the value of a specific user setting for a given user, setting name, and navigation path.
Declaration
Task SetAsync(string userIdMaster, string name, string value, string navigationPath = null)
Parameters
Type | Name | Description |
---|---|---|
string | userIdMaster | The user Id. |
string | name | The name of the setting. |
string | value | The value of the setting. |
string | navigationPath | The navigation path. |
Returns
Type | Description |
---|---|
Task | A task representing the operation. |