diff options
Diffstat (limited to 'src/WixToolset.Core.ExtensionCache/ExtensionCacheManagerExtensionCommandLine.cs')
| -rw-r--r-- | src/WixToolset.Core.ExtensionCache/ExtensionCacheManagerExtensionCommandLine.cs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/WixToolset.Core.ExtensionCache/ExtensionCacheManagerExtensionCommandLine.cs b/src/WixToolset.Core.ExtensionCache/ExtensionCacheManagerExtensionCommandLine.cs new file mode 100644 index 00000000..81e96718 --- /dev/null +++ b/src/WixToolset.Core.ExtensionCache/ExtensionCacheManagerExtensionCommandLine.cs | |||
| @@ -0,0 +1,39 @@ | |||
| 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.ExtensionCache | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.Collections.Generic; | ||
| 7 | using WixToolset.Extensibility; | ||
| 8 | using WixToolset.Extensibility.Data; | ||
| 9 | using WixToolset.Extensibility.Services; | ||
| 10 | |||
| 11 | /// <summary> | ||
| 12 | /// Parses the "extension" command-line command. See <c>ExtensionCacheManagerCommand</c> | ||
| 13 | /// for the bulk of the command-line processing. | ||
| 14 | /// </summary> | ||
| 15 | internal class ExtensionCacheManagerExtensionCommandLine : BaseExtensionCommandLine | ||
| 16 | { | ||
| 17 | public ExtensionCacheManagerExtensionCommandLine(IWixToolsetServiceProvider serviceProvider) | ||
| 18 | { | ||
| 19 | this.ServiceProvider = serviceProvider; | ||
| 20 | } | ||
| 21 | |||
| 22 | private IWixToolsetServiceProvider ServiceProvider { get; } | ||
| 23 | |||
| 24 | // TODO: Do something with CommandLineSwitches | ||
| 25 | public override IEnumerable<ExtensionCommandLineSwitch> CommandLineSwitches => base.CommandLineSwitches; | ||
| 26 | |||
| 27 | public override bool TryParseCommand(ICommandLineParser parser, string argument, out ICommandLineCommand command) | ||
| 28 | { | ||
| 29 | command = null; | ||
| 30 | |||
| 31 | if ("extension".Equals(argument, StringComparison.OrdinalIgnoreCase)) | ||
| 32 | { | ||
| 33 | command = new ExtensionCacheManagerCommand(this.ServiceProvider); | ||
| 34 | } | ||
| 35 | |||
| 36 | return command != null; | ||
| 37 | } | ||
| 38 | } | ||
| 39 | } | ||
