FinderExtendedCmdlet.cs (1771B)
1 // ----------------------------------------------------------------------------- 2 // <copyright file="FinderExtendedCmdlet.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 /// This is the base class for the commands whose sole purpose is to filter a list of packages i.e., 14 /// the "search" and "list" commands. This class contains an extended set of parameters suited for 15 /// that purpose. 16 /// </summary> 17 public abstract class FinderExtendedCmdlet : FinderCmdlet 18 { 19 /// <summary> 20 /// Gets or sets the filter that is matched against the tags of the package. 21 /// </summary> 22 [Parameter( 23 ParameterSetName = Constants.FoundSet, 24 ValueFromPipelineByPropertyName = true)] 25 public string Tag { get; set; } 26 27 /// <summary> 28 /// Gets or sets the filter that is matched against the commands of the package. 29 /// </summary> 30 [Parameter( 31 ParameterSetName = Constants.FoundSet, 32 ValueFromPipelineByPropertyName = true)] 33 public string Command { get; set; } 34 35 /// <summary> 36 /// Gets or sets the maximum number of results returned. 37 /// </summary> 38 [ValidateRange(Constants.CountLowerBound, Constants.CountUpperBound)] 39 [Parameter( 40 ParameterSetName = Constants.FoundSet, 41 ValueFromPipelineByPropertyName = true)] 42 public uint Count { get; set; } 43 } 44 }