XConfig constructor.
Syntax

[C#]

XConfig();
XConfig(bool useRegistrySettings);
XConfig(Configuration inConfiguration);
XConfig(string inPath);

[Visual Basic]

Sub New()
Sub New(useRegistrySettings As Boolean)
Sub New(inConfiguration As Configuration)
Sub New(inPath As String)
Params
Name Description
useRegistrySettings Whether to use the DefaultSettings in the registry.
inConfiguration The configuration object that points to a configuration file.
inPath The path to a configuration file.
Notes

Create a configuration object. By default this will open the configuration file specified in the registry by the "DefaultSettings" key. If this key is missing or the specified file does not exist, a file called app.exe.config located in the application folder is used. Otherwise hard-coded values are used. For web applications, web.config is used instead. If web.config does not contain any ImageGlue configuration section, hard-coded values are used.

The configuration file is never written to disk, unless you call Save.

If you wish to bypass the DefaultSettings in the registry, set useRegistrySettings to false.

If specifying an alternative configuration file path, if the file does not exist default values will be used.

If specifying a configuration object, the ImageGlue section in that object is read. If the section is not found, hard-coded values are used. In this case, the ImageGlue version in the type declaration must match the assembly version. Furthermore Save will fail in this case.

Example

None.