Ejemplo n.º 1
0
 /// <summary>
 /// Downloads the specific version of the package and returns the result
 /// </summary>
 /// <param name="package">The package being extended</param>
 /// <param name="includePrerelease">Determines if prerelease packages should be included</param>
 /// <param name="token">The optional cancellation token</param>
 /// <returns>The Package Downloaded</returns>
 public static IPackageDownload DownloadLatest(this IPackageSourceMetadata package, bool includePrerelease = false, CancellationToken token = default(CancellationToken))
 {
     return(Extensions.RunSync(() => package.DownloadLatestAsync(includePrerelease, token)));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Downloads the specific version of the package and returns the result
 /// </summary>
 /// <param name="package">The package being extended</param>
 /// <param name="version">The version to download</param>
 /// <param name="token">The optional cancellation token</param>
 /// <returns>The Package Downloaded</returns>
 public static IPackageDownload Download(this IPackageSourceMetadata package, NuGetVersion version, CancellationToken token = default(CancellationToken))
 {
     return(Extensions.RunSync(() => package.DownloadAsync(version, token)));
 }