public void Prepare(List <CombinedWebElementInfoViewModel> contexts, string originalWebElementTreePath, List <string> blockedElementsBreadStrings, List <string> blockedElementTypes) { IsEditMode = originalWebElementTreePath != null; WebElements = new ObservableCollection <CombinedWebElementInfoViewModel>(); foreach (var context in contexts) { var info = WebElementsViewModelsHelper.CreateInfoFromModel(context); var model = WebElementsViewModelsHelper.CreateModelFromInfo(info); var cleared = WebElementsViewModelsHelper.ClearAccrodingToBlocked(model, blockedElementsBreadStrings, blockedElementTypes); if (cleared != null) { WebElements.Add((CombinedWebElementInfoViewModel)cleared); } } OriginalWebElementTreePath = originalWebElementTreePath; if (OriginalWebElementTreePath != null) { SelectedWebElementTreePath = OriginalWebElementTreePath; } }