winget-cli

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

InstallerSelectionCmdlet.cs (2368B)


      1 // -----------------------------------------------------------------------------
      2 // <copyright file="InstallerSelectionCmdlet.cs" company="Microsoft Corporation">
      3 //     Copyright (c) Microsoft Corporation. Licensed under the MIT License.
      4 // </copyright>
      5 // -----------------------------------------------------------------------------
      6 
      7 namespace Microsoft.WinGet.Client.Commands
      8 {
      9     using System.Management.Automation;
     10     using Microsoft.WinGet.Client.Commands.Common;
     11     using Microsoft.WinGet.Client.PSObjects;
     12 
     13     /// <summary>
     14     /// This is the base class for all commands that select an installer from a given package.
     15     /// Contains shared arguments for the install, update, and download commands.
     16     /// </summary>
     17     public abstract class InstallerSelectionCmdlet : PackageCmdlet
     18     {
     19         /// <summary>
     20         /// Gets or sets a value indicating whether to skip the installer hash validation check.
     21         /// </summary>
     22         [Parameter(ValueFromPipelineByPropertyName = true)]
     23         public SwitchParameter AllowHashMismatch { get; set; }
     24 
     25         /// <summary>
     26         /// Gets or sets the architecture of the installer to be downloaded.
     27         /// </summary>
     28         [Parameter(ValueFromPipelineByPropertyName = true)]
     29         public PSProcessorArchitecture Architecture { get; set; } = PSProcessorArchitecture.Default;
     30 
     31         /// <summary>
     32         /// Gets or sets the installer type to be downloaded.
     33         /// </summary>
     34         [Parameter(ValueFromPipelineByPropertyName = true)]
     35         public PSPackageInstallerType InstallerType { get; set; } = PSPackageInstallerType.Default;
     36 
     37         /// <summary>
     38         /// Gets or sets the locale of the installer to be downloaded.
     39         /// </summary>
     40         [Parameter(ValueFromPipelineByPropertyName = true)]
     41         public string Locale { get; set; }
     42 
     43         /// <summary>
     44         /// Gets or sets the scope of the installer to be downloaded.
     45         /// </summary>
     46         [Parameter(ValueFromPipelineByPropertyName = true)]
     47         public PSPackageInstallScope Scope { get; set; } = PSPackageInstallScope.Any;
     48 
     49         /// <summary>
     50         /// Gets or sets a value indicating whether skip dependencies.
     51         /// </summary>
     52         [Parameter(ValueFromPipelineByPropertyName = true)]
     53         public SwitchParameter SkipDependencies { get; set; }
     54     }
     55 }