3.6.6Saving both private and category settings

It is very common for a widget's private and category settings to be the same thing. For example, if you make a change in MyTrader's standard quote board such as switching the view between grid and deal tickets then that doesn't alter other open quote boards - they ignore CATEGORY_SETTINGS_CHANGE - but the most recent changes do become the default for all new future instances of the quote board.

In other words, on a change of settings, it's very common for a widget to do the following:

var newState = Framework.OnGetState(); // See example above

Framework.SavePrivateSettings(newState); // Private settings for this instance

Framework.SaveCategorySettings(newState); // Use same settings as defaults for new instances

This can be made slightly more efficient by combining the two saves into a single call to Framework.SaveSettings(). This takes two parameters: private settings first, category settings second. The above example would then become:

var newState = Framework.OnGetState();

Framework.SaveSettings(newState, newState);