Beispiel #1
0
        protected override void ProcessPackage(PackageProvider provider, string searchKey, SoftwareIdentity package)
        {
            base.ProcessPackage(provider, searchKey, package);

            var savePath = SaveFileName(package.PackageFilename);

            // if we have a valid path, make a local copy of the file.
            if (!string.IsNullOrEmpty(savePath))
            {
                provider.DownloadPackage(package, SaveFileName(savePath), this);
                if (File.Exists(savePath))
                {
                    package.FullPath = savePath;
                }
            }

            // return the object to the caller.
            WriteObject(package);

            if (IncludeDependencies)
            {
                foreach (var dep in provider.GetPackageDependencies(package, this))
                {
                    ProcessPackage(provider, searchKey, dep);
                }
            }
        }
Beispiel #2
0
 protected override void ProcessPackage(PackageProvider provider, string searchKey, SoftwareIdentity package)
 {
     if (WhatIf)
     {
         // grab the dependencies and return them *first*
         foreach (var dep in provider.GetPackageDependencies(package, this))
         {
             ProcessPackage(provider, searchKey + dep.Name, dep);
         }
     }
     base.ProcessPackage(provider, searchKey, package);
 }
Beispiel #3
0
 protected override void ProcessPackage(PackageProvider provider, IEnumerable <string> searchKey, SoftwareIdentity package)
 {
     if (WhatIf)
     {
         // grab the dependencies and return them *first*
         foreach (var dep in provider.GetPackageDependencies(package, this.ProviderSpecific(provider)))
         {
             ProcessPackage(provider, searchKey.Select(each => each + dep.Name).ToArray(), dep);
         }
     }
     base.ProcessPackage(provider, searchKey, package);
 }
Beispiel #4
0
        protected override void ProcessPackage(PackageProvider provider, IEnumerable <string> searchKey, SoftwareIdentity package)
        {
            base.ProcessPackage(provider, searchKey, package);

            // return the object to the caller now.
            WriteObject(package);

            if (IncludeDependencies)
            {
                foreach (var dep in provider.GetPackageDependencies(package, this.ProviderSpecific(provider)))
                {
                    ProcessPackage(provider, searchKey, dep);
                }
            }
        }