/ src / modules / cmdpal / ext / Microsoft.CmdPal.Ext.WindowsServices / WindowsServicesCommandsProvider.cs
WindowsServicesCommandsProvider.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.WindowsServices.Properties;
 6  using Microsoft.CommandPalette.Extensions;
 7  using Microsoft.CommandPalette.Extensions.Toolkit;
 8  
 9  namespace Microsoft.CmdPal.Ext.WindowsServices;
10  
11  public partial class WindowsServicesCommandsProvider : CommandProvider
12  {
13      // For giggles, "%windir%\\system32\\filemgmt.dll" also _just works_.
14      public WindowsServicesCommandsProvider()
15      {
16          Id = "Windows.Services";
17          DisplayName = Resources.WindowsServicesProvider_DisplayName;
18          Icon = Icons.ServicesIcon;
19      }
20  
21      public override ICommandItem[] TopLevelCommands()
22      {
23          return [
24              new CommandItem(new ServicesListPage())
25              {
26                  Title = "Manage Windows services",
27              }
28          ];
29      }
30  }