GetVersionCmdlet.cs (1045B)
1 // ----------------------------------------------------------------------------- 2 // <copyright file="GetVersionCmdlet.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.Common; 11 using Microsoft.WinGet.Client.Engine.Commands; 12 13 /// <summary> 14 /// Get-WinGetVersion. Gets the current version of winget. 15 /// </summary> 16 [Cmdlet(VerbsCommon.Get, Constants.WinGetNouns.Version)] 17 [Alias("gwgv")] 18 [OutputType(typeof(string))] 19 public class GetVersionCmdlet : PSCmdlet 20 { 21 /// <summary> 22 /// Writes the winget version. 23 /// </summary> 24 protected override void ProcessRecord() 25 { 26 var command = new VersionCommand(this); 27 command.Get(); 28 } 29 } 30 }