Esempio n. 1
0
        bool PackageExists(Package package)
        {
            string path = Path.Combine(_options.OutputDirectory ?? "", package.Id);

            if (!_options.ExcludeVersion)
            {
                path = path + "." + package.Version;
            }

            return Directory.Exists(path);
        }
Esempio n. 2
0
        void RetrievePackage(Package package)
        {
            foreach (string source in _options.Sources)
            {
                PackageManager packageManager = GetPackageManager(source);

                packageManager.InstallPackage(package.Id, new Version(package.Version));

                if (PackageExists(package))
                {
                    break;
                }
            }
        }