winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

IWinGetUtilities.cs (1327B)


      1 // -----------------------------------------------------------------------------
      2 // <copyright file="IWinGetUtilities.cs" company="Microsoft Corporation">
      3 //     Copyright (c) Microsoft Corporation. Licensed under the MIT License.
      4 // </copyright>
      5 // -----------------------------------------------------------------------------
      6 
      7 namespace Microsoft.WinGetUtil.Interfaces
      8 {
      9     /// <summary>
     10     /// Winget Util utilities interface.
     11     /// </summary>
     12     public interface IWinGetUtilities
     13     {
     14         /// <summary>
     15         /// Download a file from URL.
     16         /// </summary>
     17         /// <param name="url">Installer url.</param>
     18         /// <param name="filePath">Destination file path.</param>
     19         /// <param name="enableLogging">Enable logging.</param>
     20         /// <param name="logFilePath">Log file path.</param>
     21         /// <returns>SHA256 of the installer.</returns>
     22         string Download(string url, string filePath, bool enableLogging = false, string logFilePath = null);
     23 
     24         /// <summary>
     25         /// Compare two version.
     26         /// </summary>
     27         /// <param name="version1">Version 1.</param>
     28         /// <param name="version2">Version 2.</param>
     29         /// <returns>Integer value indicating the comparison result.</returns>
     30         int CompareVersions(string version1, string version2);
     31     }
     32 }