/ src / dsc / v3 / PowerToys.DSC / Program.cs
Program.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 System.CommandLine;
 6  using System.CommandLine.Parsing;
 7  using System.Threading.Tasks;
 8  using PowerToys.DSC.Commands;
 9  
10  namespace PowerToys.DSC;
11  
12  /// <summary>
13  /// Main entry point for the PowerToys Desired State Configuration CLI application.
14  /// </summary>
15  public class Program
16  {
17      public static async Task<int> Main(string[] args)
18      {
19          var rootCommand = new RootCommand(Properties.Resources.PowerToysDSC);
20          rootCommand.AddCommand(new GetCommand());
21          rootCommand.AddCommand(new SetCommand());
22          rootCommand.AddCommand(new ExportCommand());
23          rootCommand.AddCommand(new TestCommand());
24          rootCommand.AddCommand(new SchemaCommand());
25          rootCommand.AddCommand(new ManifestCommand());
26          rootCommand.AddCommand(new ModulesCommand());
27          return await rootCommand.InvokeAsync(args);
28      }
29  }