public void UpdateCurrentConfigurationDefinedValue(ConfigurationSet onConfigSet) { // attempt to update our current config. ConfigurationTemplate.UpdateTemplate(CurrentConfigurationTemplate, delegate(bool result, Rock.Client.DefinedValue templateDefinedValue) { // if we got something back, continue and try to take it. // if result is true and templateDefinedValue is null, that's fine, it means there isn't a new template. // if reslut is false, we'll return that and fail. if (result && templateDefinedValue != null) { // now invoke the SetConfig, which will make sure we get all the dependencies we need. SetConfigurationDefinedValue(templateDefinedValue, onConfigSet); } else { onConfigSet(result); } }); }