Exemplo n.º 1
0
        public IPackage CreatePackageVerified(List <IPackage> packages)
        {
            var result = packages[0];

            foreach (var item in packages)
            {
                if (_verifier.VerifyPackages(item, result))
                {
                    result = item;
                }
            }

            return(result);
        }
Exemplo n.º 2
0
        public IPackage FitPackage(IBlock[] blocks, IPackage package)
        {
            foreach (var item in blocks)
            {
                foreach (var itemPackage in item.GetPackages())
                {
                    if (verifier.VerifyPackages(itemPackage, package))
                    {
                        return(itemPackage);
                    }
                }
            }

            return(null);
        }
        public IPackage FitPackage(IBlock[] blocks, IPackage package)
        {
            var packages = new List <IPackage>();

            foreach (var item in blocks)
            {
                foreach (var itemPackages in item.GetPackages())
                {
                    if (verifier.VerifyPackages(itemPackages, package))
                    {
                        packages.Add(itemPackages);
                    }
                }
            }

            return(packageVerifier.CreatePackageVerified(packages));
        }