Пример #1
0
        private static IPackage FindPackage(PackageList packages, Dependency dep)
        {
            IPackage pack = packages.FindByName(dep.PackageName);

            if (pack == null)
            {
                return(null);
            }
            if (!string.IsNullOrEmpty(dep.FeatureName))
            {
                Feature feature = pack.Features.Where(f => f.Name == dep.FeatureName).FirstOrDefault();
                if (feature == null)
                {
                    return(null);
                }
            }
            return(pack);
        }