UpdateNugetExeAsync() public méthode

Self update on nuget.exe
public UpdateNugetExeAsync ( ) : Task
Résultat Task
 private static async Task EnsureNuGetExeExistsAsync()
 {
     if (!File.Exists("nuget.exe"))
     {
         var nugetExeAddress = "https://nuget.org/nuget.exe";
         using (var webClient = new WebClient())
         {
             webClient.DownloadFileAsync(new Uri(nugetExeAddress), "nuget.exe");
         }
     }
     else
     {
         var commandlineHelper = new CommandlineHelper(ConsoleTestOutputHelper.New);
         await commandlineHelper.UpdateNugetExeAsync();
     }
 }
 private static async Task EnsureNuGetExeExistsAsync()
 {
     if (!File.Exists("nuget.exe"))
     {
         var nugetExeAddress = "https://nuget.org/nuget.exe";
         using (var webClient = new WebClient())
         {
             webClient.DownloadFileAsync(new Uri(nugetExeAddress), "nuget.exe");
         }
     }
     else
     {
         var commandlineHelper = new CommandlineHelper(ConsoleTestOutputHelper.New);
         await commandlineHelper.UpdateNugetExeAsync();
     }
 }