Show / Hide Table of Contents

Class VersionProperties

Holds settings defined in OC, in Version Properties

Inheritance
object
VersionProperties
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.Configuration
Assembly: SoCore.dll
Syntax
public class VersionProperties
Remarks

This is a dictionary of key/value pairs. The Key can be the name of a setting, or <CustXXXX>:<name-of-setting>. The forms are equivalent, except for the target. The plain form means every tenant in the process; the alternate form can set or override for a particular tenant.
The value is whatever the setting requires. Values (strings) representing integer and float is parsed using InvariantCulture.
This mechanism is intended for experimental features that need (and must allow) repeated changes to their state or configuration. It does not replace Feature Toggles, nor other ordinary settings for logging or other product features.
It should only be used for temporary, explorative code that we need to test in Prod, but want/needs to be able to fine-tune or turn off entirely, perhaps in a hurry when we realise it wasn't such a good idea after all. These values are refreshed through the Local Service Proxy about every 30 seconds, giving a quite short latency from setting in OC to actual effect in code.

Constructors

VersionProperties()

Holds settings defined in OC, in Version Properties

Declaration
public VersionProperties()
Remarks

This is a dictionary of key/value pairs. The Key can be the name of a setting, or <CustXXXX>:<name-of-setting>. The forms are equivalent, except for the target. The plain form means every tenant in the process; the alternate form can set or override for a particular tenant.
The value is whatever the setting requires. Values (strings) representing integer and float is parsed using InvariantCulture.
This mechanism is intended for experimental features that need (and must allow) repeated changes to their state or configuration. It does not replace Feature Toggles, nor other ordinary settings for logging or other product features.
It should only be used for temporary, explorative code that we need to test in Prod, but want/needs to be able to fine-tune or turn off entirely, perhaps in a hurry when we realise it wasn't such a good idea after all. These values are refreshed through the Local Service Proxy about every 30 seconds, giving a quite short latency from setting in OC to actual effect in code.

Methods

GetAllSettings()

Get all settings that have a value, prioritizing tenant-specific settings over global settings.

Declaration
public static Dictionary<string, string> GetAllSettings()
Returns
Type Description
Dictionary<string, string>
Remarks

This is a dictionary of key/value pairs. The Key can be the name of a setting, or <CustXXXX>:<name-of-setting>. The forms are equivalent, except for the target. The plain form means every tenant in the process; the alternate form can set or override for a particular tenant.
The value is whatever the setting requires. Values (strings) representing integer and float is parsed using InvariantCulture.
This mechanism is intended for experimental features that need (and must allow) repeated changes to their state or configuration. It does not replace Feature Toggles, nor other ordinary settings for logging or other product features.
It should only be used for temporary, explorative code that we need to test in Prod, but want/needs to be able to fine-tune or turn off entirely, perhaps in a hurry when we realise it wasn't such a good idea after all. These values are refreshed through the Local Service Proxy about every 30 seconds, giving a quite short latency from setting in OC to actual effect in code.

GetBoolSetting(string, bool)

Holds settings defined in OC, in Version Properties

Declaration
public static bool GetBoolSetting(string settingName, bool defaultValue = false)
Parameters
Type Name Description
string settingName
bool defaultValue
Returns
Type Description
bool
Remarks

This is a dictionary of key/value pairs. The Key can be the name of a setting, or <CustXXXX>:<name-of-setting>. The forms are equivalent, except for the target. The plain form means every tenant in the process; the alternate form can set or override for a particular tenant.
The value is whatever the setting requires. Values (strings) representing integer and float is parsed using InvariantCulture.
This mechanism is intended for experimental features that need (and must allow) repeated changes to their state or configuration. It does not replace Feature Toggles, nor other ordinary settings for logging or other product features.
It should only be used for temporary, explorative code that we need to test in Prod, but want/needs to be able to fine-tune or turn off entirely, perhaps in a hurry when we realise it wasn't such a good idea after all. These values are refreshed through the Local Service Proxy about every 30 seconds, giving a quite short latency from setting in OC to actual effect in code.

GetDoubleSetting(string, double)

Holds settings defined in OC, in Version Properties

Declaration
public static double GetDoubleSetting(string settingName, double defaultValue = 0)
Parameters
Type Name Description
string settingName
double defaultValue
Returns
Type Description
double
Remarks

This is a dictionary of key/value pairs. The Key can be the name of a setting, or <CustXXXX>:<name-of-setting>. The forms are equivalent, except for the target. The plain form means every tenant in the process; the alternate form can set or override for a particular tenant.
The value is whatever the setting requires. Values (strings) representing integer and float is parsed using InvariantCulture.
This mechanism is intended for experimental features that need (and must allow) repeated changes to their state or configuration. It does not replace Feature Toggles, nor other ordinary settings for logging or other product features.
It should only be used for temporary, explorative code that we need to test in Prod, but want/needs to be able to fine-tune or turn off entirely, perhaps in a hurry when we realise it wasn't such a good idea after all. These values are refreshed through the Local Service Proxy about every 30 seconds, giving a quite short latency from setting in OC to actual effect in code.

GetIntSetting(string, int)

Holds settings defined in OC, in Version Properties

Declaration
public static int GetIntSetting(string settingName, int defaultValue = 0)
Parameters
Type Name Description
string settingName
int defaultValue
Returns
Type Description
int
Remarks

This is a dictionary of key/value pairs. The Key can be the name of a setting, or <CustXXXX>:<name-of-setting>. The forms are equivalent, except for the target. The plain form means every tenant in the process; the alternate form can set or override for a particular tenant.
The value is whatever the setting requires. Values (strings) representing integer and float is parsed using InvariantCulture.
This mechanism is intended for experimental features that need (and must allow) repeated changes to their state or configuration. It does not replace Feature Toggles, nor other ordinary settings for logging or other product features.
It should only be used for temporary, explorative code that we need to test in Prod, but want/needs to be able to fine-tune or turn off entirely, perhaps in a hurry when we realise it wasn't such a good idea after all. These values are refreshed through the Local Service Proxy about every 30 seconds, giving a quite short latency from setting in OC to actual effect in code.

GetSetting(string, string)

Holds settings defined in OC, in Version Properties

Declaration
public static string GetSetting(string settingName, string defaultValue = "")
Parameters
Type Name Description
string settingName
string defaultValue
Returns
Type Description
string
Remarks

This is a dictionary of key/value pairs. The Key can be the name of a setting, or <CustXXXX>:<name-of-setting>. The forms are equivalent, except for the target. The plain form means every tenant in the process; the alternate form can set or override for a particular tenant.
The value is whatever the setting requires. Values (strings) representing integer and float is parsed using InvariantCulture.
This mechanism is intended for experimental features that need (and must allow) repeated changes to their state or configuration. It does not replace Feature Toggles, nor other ordinary settings for logging or other product features.
It should only be used for temporary, explorative code that we need to test in Prod, but want/needs to be able to fine-tune or turn off entirely, perhaps in a hurry when we realise it wasn't such a good idea after all. These values are refreshed through the Local Service Proxy about every 30 seconds, giving a quite short latency from setting in OC to actual effect in code.

UpdateSettings(IDictionary<string, string>)

Holds settings defined in OC, in Version Properties

Declaration
public static void UpdateSettings(IDictionary<string, string> rawSettings)
Parameters
Type Name Description
IDictionary<string, string> rawSettings
Remarks

This is a dictionary of key/value pairs. The Key can be the name of a setting, or <CustXXXX>:<name-of-setting>. The forms are equivalent, except for the target. The plain form means every tenant in the process; the alternate form can set or override for a particular tenant.
The value is whatever the setting requires. Values (strings) representing integer and float is parsed using InvariantCulture.
This mechanism is intended for experimental features that need (and must allow) repeated changes to their state or configuration. It does not replace Feature Toggles, nor other ordinary settings for logging or other product features.
It should only be used for temporary, explorative code that we need to test in Prod, but want/needs to be able to fine-tune or turn off entirely, perhaps in a hurry when we realise it wasn't such a good idea after all. These values are refreshed through the Local Service Proxy about every 30 seconds, giving a quite short latency from setting in OC to actual effect in code.

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
ObjectExtensions.AssignByReflection<T>(T, T)
ObjectExtensions.GraphCopy<T>(T)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top