Method
UpdateConfiguration(UpdateConfigParameters parameters)
This method updates the configuration by applying a series of changes to the configuration (i.e. adding options, removing options, setting property values). The changes will be applied to the configuration in the order they are provided.
By default, each change is applied consecutively and an implicit update and recalculation is performed between each one. In previous versions, this update would not occur between each change. If the IndividualizeChanges property of the UpdateConfigParameters is set to False, each change is applied in succession without the recalculation. This may enable higher performance by reducing the overall number of operations against the configuration, but be aware that this may cause some issues; for instance, the configurator may reject adding a selection to the configuration because it was originally excluded and is not yet available because the configuration has not yet been updated.
For example, suppose your configuration has two options: OPT1 and OPT2 and OPT2 is excluded. Adding OPT1 will allow OPT2. If your set of changes adds both OPT1 and OPT2, the configurator would reject the adding of OPT2. Despite having added OPT1 to satisfy the rule, the configuration has not recalculated. For this purpose, a ApplyUpdatesChange type is defined to allow you to selectively “insert” a recalculation at strategic points in your list of changes. See below for details.
var parameters = newUpdateConfigParameters() {
Changes = new ConfigChange() {
SelectionChange.Add("OPT1"),
new ApplyUpdatesChange(),
SelectionChange.Add("OPT2"),
}
};
var result = client.UpdateConfiguraiton (parameters);
Additionally, the UpdateConfigParameters object supports an IndividualizeChanges property. When true (which is the default when using the Contracts DLL), the system will implicitly insert am ApplyUpdatesChange between each change provided. This will ensure that the configuration is updated between each operation.
Parameters
The UpdateConfiguration method requires a parameters parameter of type UpdateConfigParameters.
Returns