IModuleSetupSetDefaultConfig Method |
Set the default configuration.
Namespace:
AskiaPortalCmn.Setup
Assembly:
AskiaPortalCmn (in AskiaPortalCmn.dll) Version: 1.7.0-build068
Syntax void SetDefaultConfig(
DefaultConfig defaultConfig
)
Sub SetDefaultConfig (
defaultConfig As DefaultConfig
)
void SetDefaultConfig(
DefaultConfig^ defaultConfig
)
Parameters
- defaultConfig
- Type: AskiaPortalCmn.SetupDefaultConfig
Default configuration.
Exceptions Remarks
The type of the value must be
String,
Boolean,
Int32,
Double
or
Guid.
The type of the default value will
explicitly define the type accepted
by the configuration in classical usage.
If a unmanaged type is set, this method will refuse
to add the configuration and throw an exception.
Remarks
During a module update, if the configuration
for the module is already present but doesn't
have the same type, this method will then
throw an exception.
Examples
moduleSetup.SetDefaultConfig(new DefaultConfig
{
{"myStringKey", "default value"},
{"myBoolKey", false},
{"myIntKey", 50},
{"myDblKey", 50.2},
{"myGuidKey", Guid.Parse("26f6ab8b-2fdb-4f4f-ad14-7507892846a5"},
{"defaultEmailId", 45, ValueReference.Email},
{"defaultGroupId", 32, ValueReference.Group}
});
See Also