protected void TraverseAppData(ProcessAppWinData processAppWinData) { foreach (AppData appData in apps.Values) { foreach (AppWinData appWinData in appData.Windows.Values) { processAppWinData(appData, appWinData); } } }
public List <AppInfo> ToAppInfos() { List <AppInfo> appInfos = new List <AppInfo>(); ProcessAppWinData addAppInfo = (appData, appWinData) => { if (Properties.Settings.Default.IsShowSingle || appData.Windows.Count > 1) { appInfos.Add(new AppInfo(appData, appWinData)); } }; TraverseAppData(addAppInfo); return(appInfos); }