private static void AddChildTabsToList(TabInfo currentTab, ref TabCollection allPortalTabs, ref IDictionary <int, TabInfo> tabsWithModule, ref IDictionary <int, TabInfo> tabsInOrder) { if ((tabsWithModule.ContainsKey(currentTab.TabID) && !tabsInOrder.ContainsKey(currentTab.TabID))) { //add current tab tabsInOrder.Add(currentTab.TabID, currentTab); //add children of current tab foreach (TabInfo tab in allPortalTabs.WithParentId(currentTab.TabID)) { AddChildTabsToList(tab, ref allPortalTabs, ref tabsWithModule, ref tabsInOrder); } } }
private static void AddChildTabsToList(TabInfo currentTab, ref TabCollection allPortalTabs, ref IDictionary <int, TabInfo> tabsWithModule, ref IDictionary <int, TabInfo> tabsInOrder) { if (!tabsWithModule.ContainsKey(currentTab.TabID) || tabsInOrder.ContainsKey(currentTab.TabID)) { return; } tabsInOrder.Add(currentTab.TabID, currentTab); foreach (TabInfo tab in allPortalTabs.WithParentId(currentTab.TabID)) { AddChildTabsToList(tab, ref allPortalTabs, ref tabsWithModule, ref tabsInOrder); } }
private void AddChildTabsToList(TabInfo currentTab, ref TabCollection allPortalTabs, ref IDictionary<int, TabInfo> tabsWithModule, ref IDictionary<int, TabInfo> tabsInOrder) { if ((tabsWithModule.ContainsKey(currentTab.TabID) && !tabsInOrder.ContainsKey(currentTab.TabID))) { //add current tab tabsInOrder.Add(currentTab.TabID, currentTab); //add children of current tab foreach (TabInfo tab in allPortalTabs.WithParentId(currentTab.TabID)) { AddChildTabsToList(tab, ref allPortalTabs, ref tabsWithModule, ref tabsInOrder); } } }