Click or drag to resize

IConfigItem Property (String, NullableGuid)

Get the configuration item of the specified module.

Namespace:  AskiaPortalCmn.Configuration
Assembly:  AskiaPortalCmn (in AskiaPortalCmn.dll) Version: 1.7.0-build068
Syntax
IConfigItem this[
	string key,
	Nullable<Guid> moduleGuid = null
] { get; }

Parameters

key
Type: SystemString
Key of the config in the specified namespace
moduleGuid (Optional)
Type: SystemNullableGuid
GUID of the module from where the config belongs to.
If null or omit, the CurrentModule will be used.

Property Value

Type: IConfigItem
Examples

Retrieve the config item of `myModule` with the key `key1`.

using AskiaPortalCmn.Configuration;

// ...
var config = Config.GetInstance();
var myModuleGuid = Guid.Parse("0c3845fd-2465-42ca-84ba-3ab39e521098");
Console.WriteLine("The value of `myModule``key1` is `{0}`", config["key1", myModuleGuid].ValueAsString);
See Also