public void AddApp(AppType appType, AppInfo appInfo, bool resetImage) { if (FindByApp(appType, appInfo) != null) { return; } if (resetImage) { appInfo.AppImage = null; } if (appType != null) { appType = appType.CloneWithoutItems(); } Add(new DeletedApp { App = appInfo, DeletedFrom = appType }); }
public void AddAppType(AppType appType, bool resetImage) { if (appType == null) { return; } var apps = appType.AppInfos; for (int i = 0; i < apps.Count; i++) { var app = apps[i]; if (FindByApp(appType, app) != null) { continue; } Add(new DeletedApp { App = app, DeletedFrom = appType.CloneWithoutItems() }); } }