private void AddMissingComponents() { var selectedComponents = ExtractSelectedComponents(this.SelectedComponents.Items); StartBusyAction(() => { var backgroundOperation = new StandardBackgroundOperation(); ServiceLocator.GetInstance <IBackgroundOperationsRegion>().RegisterOperation(backgroundOperation); try { FeatureBranch.AddMissingComponents(selectedComponents.ToArray(), (eventData) => { backgroundOperation.Update(eventData.Percentage, eventData.ActionDescription); }); } catch (Exception ex) { backgroundOperation.Failed($"Failed to add missing components to '{this.FeatureBranch.Name}' feature", ex.ToString()); throw; } ServiceLocator.GetInstance <IBackgroundOperationsRegion>().UnregisterOperation(backgroundOperation); this.Deactivate(); }); }
private void LoadComponents() { this.Components = new ComponentsExplorerBar(FeatureBranch.GetComponents(), ServiceLocator); }