private static void MapControllerItemsForScenario(ScenariosConainer scenariosConainer, ObservableCollection <Item> scenariosCollection) { var controllerNames = scenariosConainer.GetControllerNames(); foreach (var controllerName in controllerNames) { scenariosCollection.Add(new Item() { Title = controllerName, Path = controllerName + "/" }); } }
private static void MapViewItemsForScenario(ScenariosConainer scenariosConainer, ObservableCollection <Item> scenariosCollection) { foreach (var item in scenariosCollection) { foreach (var viewName in scenariosConainer.GetViewNames(item.Title)) { item.AddItem(new Item() { Title = viewName }); } } }
public static ObservableCollection <Item> MapScenarioItems(ScenariosConainer scenarioContainer) { var resultCollection = new ObservableCollection <Item>(); MapControllerItemsForScenario(scenarioContainer, resultCollection); MapViewItemsForScenario(scenarioContainer, resultCollection); foreach (var scenario in scenarioContainer.GetScenarios()) { if (!IsInList(scenario, resultCollection) && scenario.GetScenarioResult() != null) { AddScenarioToCollection(scenario, resultCollection); } } RemoveUnfiledNodes(resultCollection); return(resultCollection); }
public void SetScenarioContainer(ScenariosConainer scenariosContainer) { _scenariosContainer = scenariosContainer; }