BlogEngine.Core.Packaging.PackageRepository.LocalPackages C# (CSharp) Method

LocalPackages() public static method

Returns list of local packages from repository For reference: G - package exists only in the online gallery I - installed from gallery, exists both in gallery and locally L - local, only exists locally
public static LocalPackages ( string pkgType ) : List
pkgType string Package type
return List
        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;
        }