main
cs 44 lines 1.5 KB
Raw
1 // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3 namespace WixToolset.Core.Burn
4 {
5 using System;
6 using WixToolset.Core.Burn.CommandLine;
7 using WixToolset.Extensibility;
8 using WixToolset.Extensibility.Data;
9 using WixToolset.Extensibility.Services;
10
11 /// <summary>
12 /// Parses the "burn" command-line command. See <c>BurnCommand</c>
13 /// for the bulk of the command-line processing.
14 /// </summary>
15 internal class BurnExtensionCommandLine : BaseExtensionCommandLine
16 {
17 public BurnExtensionCommandLine(IServiceProvider serviceProvider)
18 {
19 this.ServiceProvider = serviceProvider;
20 }
21
22 private IServiceProvider ServiceProvider { get; }
23
24 public override CommandLineHelp GetCommandLineHelp()
25 {
26 return new CommandLineHelp(null)
27 {
28 Commands = new[] { new CommandLineHelpCommand("burn", "Specialized operations for manipulating Burn-based bundles.") }
29 };
30 }
31
32 public override bool TryParseCommand(ICommandLineParser parser, string argument, out ICommandLineCommand command)
33 {
34 command = null;
35
36 if ("burn".Equals(argument, StringComparison.OrdinalIgnoreCase))
37 {
38 command = new BurnCommand(this.ServiceProvider);
39 }
40
41 return command != null;
42 }
43 }
44 }