/ src / modules / cmdpal / ext / Microsoft.CmdPal.Ext.Registry / RegistryCommandsProvider.cs
RegistryCommandsProvider.cs
 1  // Copyright (c) Microsoft Corporation
 2  // The Microsoft Corporation licenses this file to you under the MIT license.
 3  // See the LICENSE file in the project root for more information.
 4  
 5  using Microsoft.CmdPal.Ext.Registry.Helpers;
 6  using Microsoft.CmdPal.Ext.Registry.Properties;
 7  using Microsoft.CommandPalette.Extensions;
 8  using Microsoft.CommandPalette.Extensions.Toolkit;
 9  
10  namespace Microsoft.CmdPal.Ext.Registry;
11  
12  public partial class RegistryCommandsProvider : CommandProvider
13  {
14      private static readonly ISettingsInterface _settingsManager = new SettingsManager();
15  
16      public RegistryCommandsProvider()
17      {
18          Id = "Windows.Registry";
19          DisplayName = Resources.RegistryProvider_DisplayName;
20          Icon = Icons.RegistryIcon;
21      }
22  
23      public override ICommandItem[] TopLevelCommands()
24      {
25          return [
26              new CommandItem(new RegistryListPage(_settingsManager))
27              {
28                  Title = "Browse the Windows registry",
29              }
30          ];
31      }
32  }