winget-cli

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

GetUserSettingCmdlet.cs (1079B)


      1 // -----------------------------------------------------------------------------
      2 // <copyright file="GetUserSettingCmdlet.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.Collections;
     10     using System.Management.Automation;
     11     using Microsoft.WinGet.Client.Common;
     12     using Microsoft.WinGet.Client.Engine.Commands;
     13 
     14     /// <summary>
     15     /// Gets winget's user settings.
     16     /// </summary>
     17     [Cmdlet(VerbsCommon.Get, Constants.WinGetNouns.UserSetting)]
     18     [Alias("gwgus", "Get-WinGetUserSettings")]
     19     [OutputType(typeof(Hashtable))]
     20     public sealed class GetUserSettingCmdlet : PSCmdlet
     21     {
     22         /// <summary>
     23         /// Gets the settings file contents.
     24         /// </summary>
     25         protected override void ProcessRecord()
     26         {
     27             var command = new UserSettingsCommand(this);
     28             command.Get();
     29         }
     30     }
     31 }