winget-cli

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

WinGetPackageManagerCmdlet.cs (1641B)


      1 // -----------------------------------------------------------------------------
      2 // <copyright file="WinGetPackageManagerCmdlet.cs" company="Microsoft Corporation">
      3 //     Copyright (c) Microsoft Corporation. Licensed under the MIT License.
      4 // </copyright>
      5 // -----------------------------------------------------------------------------
      6 
      7 namespace Microsoft.WinGet.Client.Commands.Common
      8 {
      9     using System.Management.Automation;
     10     using Microsoft.WinGet.Client.Common;
     11 
     12     /// <summary>
     13     /// Common parameters for Assert-WinGetPackageManager and Repair-WinGetPackageManager.
     14     /// </summary>
     15     public abstract class WinGetPackageManagerCmdlet : PSCmdlet
     16     {
     17         /// <summary>
     18         /// Gets or sets the optional version.
     19         /// </summary>
     20         [Parameter(
     21             ParameterSetName = Constants.IntegrityVersionSet,
     22             ValueFromPipelineByPropertyName = true)]
     23         public string Version { get; set; } = string.Empty;
     24 
     25         /// <summary>
     26         /// Gets or sets a value indicating whether to use latest.
     27         /// </summary>
     28         [Parameter(
     29             ParameterSetName = Constants.IntegrityLatestSet,
     30             ValueFromPipelineByPropertyName = true)]
     31         public SwitchParameter Latest { get; set; }
     32 
     33         /// <summary>
     34         /// Gets or sets a value indicating whether to include prerelease winget versions.
     35         /// </summary>
     36         [Parameter(
     37             ParameterSetName = Constants.IntegrityLatestSet,
     38             ValueFromPipelineByPropertyName = true)]
     39         public SwitchParameter IncludePrerelease { get; set; }
     40     }
     41 }