コード例 #1
0
        private static ChocolateyPackageVersion ConvertToPackageVersion(FeedPackage package)
        {
            var convertedPackage = new ChocolateyPackageVersion
            {
                Author         = package.Authors,
                ChocolateyLink = new Uri(package.GalleryDetailsUrl),
                Id             = package.Id,
                Title          = package.Title,
                Description    = package.Description,
                Version        = package.Version,
                ReleaseNotes   = package.ReleaseNotes,
                DownloadCount  = package.DownloadCount,
                IconLink       = string.IsNullOrEmpty(package.IconUrl)
                        ? null
                        : new Uri(package.IconUrl),
                ProjectLink =
                    string.IsNullOrEmpty(package.ProjectUrl)
                        ? null
                        : new Uri(package.ProjectUrl)
            };

            return(convertedPackage);
        }
コード例 #2
0
 public async Task Install(ChocolateyPackageVersion package)
 {
     await this.Install(package, string.Empty);
 }
コード例 #3
0
 public async Task Install(ChocolateyPackageVersion package, string arguments)
 {
     await this.Install(package, string.Empty, new CancellationToken());
 }