These new API classes were introduced to make package settings type-aware. They are lacking a few features...
- Because we support both known settings, defined in
SettingDefinitions and unknown settings of Type string, int or bool, it's possible for a user to add a known setting with an incorrect Type. The methods of PackageSettings that permit this are Add(string name, string value), Add(string, name, bool value) and Add(string name, int value). These should give an error if a known setting name is used with an incorrect Type.
- To support item 1,
SettingDefinitions needs a static lookup method to provide the SettingDefinition associated with a name.
- PackageSettings needs methods to remove a setting when required.
These new API classes were introduced to make package settings type-aware. They are lacking a few features...
SettingDefinitionsand unknown settings of Type string, int or bool, it's possible for a user to add a known setting with an incorrect Type. The methods ofPackageSettingsthat permit this areAdd(string name, string value),Add(string, name, bool value)andAdd(string name, int value). These should give an error if a known setting name is used with an incorrect Type.SettingDefinitionsneeds a static lookup method to provide theSettingDefinitionassociated with a name.