• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Interface IHostSettingsService

The IHostSettingsService provides business layer of the HostSettings Entity.

Namespace: DotNetNuke.Abstractions.Application
Assembly: DotNetNuke.Abstractions.dll
Syntax
public interface IHostSettingsService
Examples
public class MySampleClass
{
    IHostSettingsService service;
    public MySampleClass(IHostSettingsService service)
    {
        this.service = service;
    }

    public bool CheckUpgrade { get => this.service.GetBoolean("CheckUpgrade", true);
}

Methods

| Improve this Doc View Source

GetBoolean(String, Boolean)

Gets the setting value by the specific key.

Declaration
bool GetBoolean(string key, bool defaultValue)
Parameters
Type Name Description
System.String key

The key.

System.Boolean defaultValue

this value will be return if setting's value is empty.

Returns
Type Description
System.Boolean

host setting's value.

| Improve this Doc View Source

GetBoolean(String)

Gets the setting value by the specific key.

Declaration
bool GetBoolean(string key)
Parameters
Type Name Description
System.String key

The key.

Returns
Type Description
System.Boolean

host setting's value.

| Improve this Doc View Source

GetDouble(String, Double)

Gets the setting value by the specific key.

Declaration
double GetDouble(string key, double defaultValue)
Parameters
Type Name Description
System.String key

The key.

System.Double defaultValue

this value will be return if setting's value is empty.

Returns
Type Description
System.Double

host setting's value.

| Improve this Doc View Source

GetDouble(String)

Gets the setting value by the specific key.

Declaration
double GetDouble(string key)
Parameters
Type Name Description
System.String key

The key.

Returns
Type Description
System.Double

host setting's value.

| Improve this Doc View Source

GetEncryptedString(String, String)

takes in a text value, decrypts it with a FIPS compliant algorithm and returns the value.

Declaration
string GetEncryptedString(string key, string passPhrase)
Parameters
Type Name Description
System.String key

the host setting to read.

System.String passPhrase

the pass phrase used for encryption/decryption.

Returns
Type Description
System.String

The setting value as a .

| Improve this Doc View Source

GetInteger(String, Int32)

Gets the setting value by the specific key.

Declaration
int GetInteger(string key, int defaultValue)
Parameters
Type Name Description
System.String key

The key.

System.Int32 defaultValue

this value will be return if setting's value is empty.

Returns
Type Description
System.Int32

host setting's value.

| Improve this Doc View Source

GetInteger(String)

Gets the setting value by the specific key.

Declaration
int GetInteger(string key)
Parameters
Type Name Description
System.String key

The key.

Returns
Type Description
System.Int32

host setting's value.

| Improve this Doc View Source

GetSettings()

Gets all host settings.

Declaration
IDictionary<string, IConfigurationSetting> GetSettings()
Returns
Type Description
IDictionary<System.String, IConfigurationSetting>

host setting.

| Improve this Doc View Source

GetSettingsDictionary()

Gets all host settings as dictionary.

Declaration
IDictionary<string, string> GetSettingsDictionary()
Returns
Type Description
IDictionary<System.String, System.String>

host setting's value.

| Improve this Doc View Source

GetString(String, String)

Gets the setting value by the specific key.

Declaration
string GetString(string key, string defaultValue)
Parameters
Type Name Description
System.String key

The key.

System.String defaultValue

this value will be return if setting's value is empty.

Returns
Type Description
System.String

host setting's value.

| Improve this Doc View Source

GetString(String)

Gets the setting value by the specific key.

Declaration
string GetString(string key)
Parameters
Type Name Description
System.String key

The key.

Returns
Type Description
System.String

host setting's value.

| Improve this Doc View Source

IncrementCrmVersion(Boolean)

Increments the Client Resource Manager (CRM) version to bust local cache.

Declaration
void IncrementCrmVersion(bool includeOverridingPortals)
Parameters
Type Name Description
System.Boolean includeOverridingPortals

If true also forces a CRM version increment on portals that have non-default settings for CRM.

| Improve this Doc View Source

Update(IConfigurationSetting, Boolean)

Updates the specified config.

Declaration
void Update(IConfigurationSetting config, bool clearCache)
Parameters
Type Name Description
IConfigurationSetting config

The config.

System.Boolean clearCache

if set to true will clear cache after updating the setting.

| Improve this Doc View Source

Update(IConfigurationSetting)

Updates the specified config.

Declaration
void Update(IConfigurationSetting config)
Parameters
Type Name Description
IConfigurationSetting config

The config.

| Improve this Doc View Source

Update(IDictionary<String, String>)

Updates the specified settings.

Declaration
void Update(IDictionary<string, string> settings)
Parameters
Type Name Description
IDictionary<System.String, System.String> settings

The settings.

| Improve this Doc View Source

Update(String, String, Boolean)

Updates the specified key.

Declaration
void Update(string key, string value, bool clearCache)
Parameters
Type Name Description
System.String key

The key.

System.String value

The value.

System.Boolean clearCache

if set to true will clear cache after update settings.

| Improve this Doc View Source

Update(String, String)

Updates the setting for a specified key.

Declaration
void Update(string key, string value)
Parameters
Type Name Description
System.String key

The key.

System.String value

The value.

| Improve this Doc View Source

UpdateEncryptedString(String, String, String)

Takes in a value, encrypts it with a FIPS compliant algorithm and stores it.

Declaration
void UpdateEncryptedString(string key, string value, string passPhrase)
Parameters
Type Name Description
System.String key

host settings key.

System.String value

host settings value.

System.String passPhrase

pass phrase to allow encryption/decryption.

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS