ConfigItem 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 public IConfigItem this[
string key,
Nullable<Guid> moduleGuid = null
] { get; }
Public ReadOnly Default Property Item (
key As String,
Optional moduleGuid As Nullable(Of Guid) = Nothing
) As IConfigItem
Get
public:
virtual property IConfigItem^ default[String^ key, Nullable<Guid> moduleGuid = nullptr] {
IConfigItem^ get (String^ key, Nullable<Guid> moduleGuid = nullptr) sealed;
}
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:
IConfigItemImplements
IConfigItemString, NullableGuidExamples
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