Interface ISettingService
Service to manage Settings
public interface ISettingService
Methods
AddOrUpdateSettingAsync(string, int, string, string, bool)
Updates setting for a given entityName and Id
Task AddOrUpdateSettingAsync(string entityName, int entityId, string settingName, string settingValue, bool isPrivate)
Parameters
Returns
AddSettingAsync(Setting)
Creates a new setting
Task<Setting> AddSettingAsync(Setting setting)
Parameters
setting
Setting
Returns
ClearSiteSettingsCacheAsync()
Clears site option cache
Task ClearSiteSettingsCacheAsync()
Returns
DeleteSettingAsync(int)
[Obsolete("DeleteSettingAsync(int settingId) is deprecated. Use DeleteSettingAsync(string entityName, int settingId) instead.", false)]
Task DeleteSettingAsync(int settingId)
Parameters
settingId
int
Returns
DeleteSettingAsync(string, int)
Deletes a setting
Task DeleteSettingAsync(string entityName, int settingId)
Parameters
Returns
DeleteSettingAsync(string, int, string)
Returns a specific setting
Task DeleteSettingAsync(string entityName, int entityId, string settingName)
Parameters
Returns
GetFolderSettingsAsync(int)
Returns a key-value dictionary of all folder settings for the given folder
Task<Dictionary<string, string>> GetFolderSettingsAsync(int folderId)
Parameters
folderId
int
Returns
GetHostSettingsAsync()
Returns a key-value dictionary of all tenant settings
Task<Dictionary<string, string>> GetHostSettingsAsync()
Returns
GetModuleDefinitionSettingsAsync(int)
Returns a key-value dictionary of all module settings for the given module
Task<Dictionary<string, string>> GetModuleDefinitionSettingsAsync(int moduleDefinitionId)
Parameters
moduleDefinitionId
int
Returns
GetModuleSettingsAsync(int)
Returns a key-value dictionary of all module settings for the given module
Task<Dictionary<string, string>> GetModuleSettingsAsync(int moduleId)
Parameters
moduleId
int
Returns
GetPageModuleSettingsAsync(int)
Returns a key-value dictionary of all page module settings for the given page module
Task<Dictionary<string, string>> GetPageModuleSettingsAsync(int pageModuleId)
Parameters
pageModuleId
int
Returns
GetPageSettingsAsync(int)
Returns a key-value dictionary of all page settings for the given page
Task<Dictionary<string, string>> GetPageSettingsAsync(int pageId)
Parameters
pageId
int
Returns
GetSetting(Dictionary<string, string>, string, string)
Gets the value of the given settingName (key) from the given key-value dictionary
string GetSetting(Dictionary<string, string> settings, string settingName, string defaultValue)
Parameters
settings
Dictionary<string, string>settingName
stringdefaultValue
string
Returns
GetSettingAsync(int)
[Obsolete("GetSettingAsync(int settingId) is deprecated. Use GetSettingAsync(string entityName, int settingId) instead.", false)]
Task<Setting> GetSettingAsync(int settingId)
Parameters
settingId
int
Returns
GetSettingAsync(string, int)
Returns a specific setting
Task<Setting> GetSettingAsync(string entityName, int settingId)
Parameters
Returns
GetSettingsAsync(string, int)
Returns a key-value dictionary of all settings for the given entityName
Task<Dictionary<string, string>> GetSettingsAsync(string entityName, int entityId)
Parameters
Returns
GetSettingsAsync(string, int, string)
Returns a specific setting
Task<List<Setting>> GetSettingsAsync(string entityName, int entityId, string settingName)
Parameters
Returns
GetSiteSettingsAsync(int)
Returns a key-value dictionary of all site settings for the given site
Task<Dictionary<string, string>> GetSiteSettingsAsync(int siteId)
Parameters
siteId
int
Returns
GetTenantSettingsAsync()
Returns a key-value dictionary of all tenant settings
Task<Dictionary<string, string>> GetTenantSettingsAsync()
Returns
GetUserSettingsAsync(int)
Returns a key-value dictionary of all user settings for the given user
Task<Dictionary<string, string>> GetUserSettingsAsync(int userId)
Parameters
userId
int
Returns
GetVisitorSettingsAsync(int)
Returns a key-value dictionary of all settings for the given visitor
Task<Dictionary<string, string>> GetVisitorSettingsAsync(int visitorId)
Parameters
visitorId
int
Returns
MergeSettings(Dictionary<string, string>, Dictionary<string, string>)
Dictionary<string, string> MergeSettings(Dictionary<string, string> settings1, Dictionary<string, string> settings2)
Parameters
settings1
Dictionary<string, string>settings2
Dictionary<string, string>
Returns
SetSetting(Dictionary<string, string>, string, string)
Sets the value of the given settingName (key) in the given key-value dictionary
Dictionary<string, string> SetSetting(Dictionary<string, string> settings, string settingName, string settingValue)
Parameters
settings
Dictionary<string, string>settingName
stringsettingValue
string
Returns
SetSetting(Dictionary<string, string>, string, string, bool)
Dictionary<string, string> SetSetting(Dictionary<string, string> settings, string settingName, string settingValue, bool isPrivate)
Parameters
Returns
UpdateFolderSettingsAsync(Dictionary<string, string>, int)
Updates a folder setting
Task UpdateFolderSettingsAsync(Dictionary<string, string> folderSettings, int folderId)
Parameters
folderSettings
Dictionary<string, string>folderId
int
Returns
UpdateHostSettingsAsync(Dictionary<string, string>)
Updates a host setting
Task UpdateHostSettingsAsync(Dictionary<string, string> hostSettings)
Parameters
hostSettings
Dictionary<string, string>
Returns
UpdateModuleDefinitionSettingsAsync(Dictionary<string, string>, int)
Updates a module setting
Task UpdateModuleDefinitionSettingsAsync(Dictionary<string, string> moduleDefinitionSettings, int moduleDefinitionId)
Parameters
moduleDefinitionSettings
Dictionary<string, string>moduleDefinitionId
int
Returns
UpdateModuleSettingsAsync(Dictionary<string, string>, int)
Updates a module setting
Task UpdateModuleSettingsAsync(Dictionary<string, string> moduleSettings, int moduleId)
Parameters
moduleSettings
Dictionary<string, string>moduleId
int
Returns
UpdatePageModuleSettingsAsync(Dictionary<string, string>, int)
Updates a page module setting
Task UpdatePageModuleSettingsAsync(Dictionary<string, string> pageModuleSettings, int pageModuleId)
Parameters
pageModuleSettings
Dictionary<string, string>pageModuleId
int
Returns
UpdatePageSettingsAsync(Dictionary<string, string>, int)
Updates a page setting
Task UpdatePageSettingsAsync(Dictionary<string, string> pageSettings, int pageId)
Parameters
pageSettings
Dictionary<string, string>pageId
int
Returns
UpdateSettingAsync(Setting)
Updates a existing setting
Task<Setting> UpdateSettingAsync(Setting setting)
Parameters
setting
Setting
Returns
UpdateSettingsAsync(Dictionary<string, string>, string, int)
Updates settings for a given entityName and Id
Task UpdateSettingsAsync(Dictionary<string, string> settings, string entityName, int entityId)
Parameters
settings
Dictionary<string, string>entityName
stringentityId
int
Returns
UpdateSiteSettingsAsync(Dictionary<string, string>, int)
Updates a site setting
Task UpdateSiteSettingsAsync(Dictionary<string, string> siteSettings, int siteId)
Parameters
siteSettings
Dictionary<string, string>siteId
int
Returns
UpdateTenantSettingsAsync(Dictionary<string, string>)
Updates a tenant setting
Task UpdateTenantSettingsAsync(Dictionary<string, string> tenantSettings)
Parameters
tenantSettings
Dictionary<string, string>
Returns
UpdateUserSettingsAsync(Dictionary<string, string>, int)
Updates a user setting
Task UpdateUserSettingsAsync(Dictionary<string, string> userSettings, int userId)
Parameters
userSettings
Dictionary<string, string>userId
int
Returns
UpdateVisitorSettingsAsync(Dictionary<string, string>, int)
Updates a visitor setting
Task UpdateVisitorSettingsAsync(Dictionary<string, string> visitorSettings, int visitorId)
Parameters
visitorSettings
Dictionary<string, string>visitorId
int