-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from nventive/dev/beca/logging
Dev/beca/logging
- Loading branch information
Showing
18 changed files
with
343 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using NuGet.Shared.Entities; | ||
|
||
namespace NuGet.Downloader.Entities | ||
{ | ||
public class DownloaderResult | ||
{ | ||
public LocalPackage[] DownloadedPackages { get; set; } | ||
|
||
public LocalPackage[] PushedPackages { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
namespace NuGet.Updater.Entities | ||
{ | ||
internal struct LogDisplayOptions | ||
{ | ||
public static readonly LogDisplayOptions Summary = new LogDisplayOptions | ||
{ | ||
IncludeUrls = true, | ||
PrettifyTable = false, | ||
}; | ||
|
||
public static readonly LogDisplayOptions Console = new LogDisplayOptions | ||
{ | ||
IncludeUrls = false, | ||
PrettifyTable = true, | ||
}; | ||
|
||
public bool IncludeUrls { get; set; } | ||
|
||
public bool PrettifyTable { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using NuGet.Shared.Entities; | ||
using NuGet.Updater.Entities; | ||
|
||
namespace NuGet.Updater.Extensions | ||
{ | ||
public static class FeedVersionExtensions | ||
{ | ||
/// <summary> | ||
/// Gets the latest version for the given reference by looking up first in a list of known packages. | ||
/// Useful in the cases where refernces to multiple versions of the same packages are found. | ||
/// </summary> | ||
public static async Task<FeedVersion> GetLatestVersion( | ||
this PackageReference reference, | ||
CancellationToken ct, | ||
IEnumerable<UpdaterPackage> knownPackages, | ||
UpdaterParameters parameters | ||
) | ||
{ | ||
var knownVersion = knownPackages.FirstOrDefault(p => p.PackageId == reference.Identity.Id)?.Version; | ||
|
||
if(knownVersion == null) | ||
{ | ||
knownVersion = await reference.GetLatestVersion(ct, parameters); | ||
} | ||
|
||
return knownVersion; | ||
} | ||
} | ||
} |
Oops, something went wrong.