private void AddQuickInfo(Guid id, QuickInfoViewConfiguration viewConfig, QuickInfoConfiguration analyserConfig) { var viewModel = new QuickInfoViewModel(id, viewConfig, analyserConfig); viewModel.OnRemoved += OnQuickInfoRemoved; viewModel.IsEditing = IsEditing; _quickInfosById.Add(id, viewModel); _quickInfos.Add(viewModel); }
private void OnQuickInfoRemoved(QuickInfoViewModel viewModel) { var id = viewModel.Id; _quickInfosById.Remove(id); _quickInfos.Remove(viewModel); _viewConfiguration.Remove(id); _analyserConfiguration.Remove(id); viewModel.OnRemoved -= OnQuickInfoRemoved; }