Frameworksettings XML file format
A file with setting definitions specific for one or more target
frameworks is a file with the extension .frameworksettings
. To edit
such a file, drag it onto the LLBLGen Pro designer from windows
explorer. The .frameworksettings
file is an XML file with the following
format.
<?xml version="1.0" ?>
<frameworkSettings xmlns="http://sd/llblgen/pro/frameworkSettingsDefinition.xsd">
<supportedFrameworks>
<framework name=""/>
<!-- more -->
</supportedFrameworks>
<settingDefinitions>
<settingDefinition name="" description="" type="" category="" targetElement=""
default="" source="" defaultSource="" isVisible="" canBeEmpty=""/>
<!-- more -->
</settingDefinitions>
<valueLists>
<valueList name="">
<value valueText=""/>
<!-- more -->
</valueList>
<!-- more -->
</valueLists>
</frameworkSettings>
Duplicate names (e.g. a setting is defined multiple times across different frameworks) are ignored: the first one is read, all others are ignored.
The following elements are recognized in the .frameworksettings files:
- supportedFrameworks. This is the section which contains the specification of 0 or more frameworks for which the setting definitions are valid. If no framework is specified, the setting definitions are valid for all frameworks
- settingDefinitions. This is the section where all settingdefinition elements are stored (0 or more).
- settingDefinition, element inside settingDefinitions. The actual setting definition. For the attribute description, see the section below.
- valueLists. The section which contains 0 or more valueList definitions. Optional.
- valueList, element inside valueLists. The element which defines a value list and which contains 1 or more value elements. If a list contains 0 elements, the list is ignored.
- value, element inside valueList. A value definition for a value list. It has two attributes: displayText and valueText used for editing purposes. At the moment, only 'valueTest' is used, displayText is ignored, valueText is also used for display.
settingDefinition attributes
The following attributes can be defined for the settingDefinition element in a frameworksettings file:
- name. The name of the setting. Has to be unique. This is also used for the name of the surrogate property which is edited in the propertygrid
- description. The description text which is shown in the pane below the property grid
- type. This is the type of the surrogate property. Values can be bool, int, string, enum
- category. This is the category under which the setting is stored. Used by the property grid.
- targetElement. This is a numeric enum value for the target element the setting is for. See defining and consuming custom settings for details about which values are accepted.
- default. This is the default value of the setting. It has to be convertible from string to type. Optional, unless canBeEmpty is set to false, in which case Default is required.
- source. This is the name of the source for the values of the setting. If type is a string, this is the name of a list of string values defined as a valuelist, if type is an enum, it's the full name of the enum type (including assembly name). This name is used with the System.Type class to load the enum type. Optional.
- defaultSource. This is the name of a default setting which is used to obtain the default value from. If specified, it overrules default. The name specified has to be the name of a setting which has TargetElement set to 1 (project). Optional.
- canBeEmpty. This is a boolean flag which signals if a setting can be the empty string. Only necessary for string typed setting definitions. Default is true. If canBeEmpty is set to false, and an empty string is specified, the value is changed to null, which will revert to the default value. It's required that when canBeEmpty is set to false, default is set to a valid value.
- isVisible. This is a boolean flag which signals if a setting is visible in editors (true, default) or not (false). If set to false, its default value is obtainable in templates still but it won't show up in editors and therefore the user won't be able to edit the value. If not specified, the default value, true, is assumed.