public IEnumerable <ItemDataSource> ApplyChanges(ToolboxControlledPageDataSource page) { foreach (var item in page.Items) { var isChecked = item.IsChecked; var flag = _service.ToolboxHasItem(item.Definition); if (isChecked && !flag) { InstallItem(item); yield return(item); } else if (!isChecked & flag) { RemoveItemFromToolbox(item); } } }