public static List<JsonPackage> LocalPackages(string pkgType) { var packages = new List<JsonPackage>(); foreach (var pkg in CachedPackages) { if(pkgType != "all") { if (pkg.PackageType != pkgType) continue; } if(pkg.Location == "G") continue; packages.Add(pkg); } return packages; }