| 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.Extensibility.Services |
| 4 | { |
| 5 | using WixToolset.Extensibility.Data; |
| 6 | |
| 7 | /// <summary> |
| 8 | /// Command-line parsing mechanism. |
| 9 | /// </summary> |
| 10 | public interface ICommandLine |
| 11 | { |
| 12 | /// <summary> |
| 13 | /// Simple way to parse arguments and create a command. |
| 14 | /// </summary> |
| 15 | /// <param name="args">Unparsed arguments.</param> |
| 16 | /// <returns>Command if the command-line arguments can be parsed, otherwise null.</returns> |
| 17 | ICommandLineCommand CreateCommand(string[] args); |
| 18 | |
| 19 | /// <summary> |
| 20 | /// Simple way to parse arguments and create a command. |
| 21 | /// </summary> |
| 22 | /// <param name="commandLine">Unparsed arguments.</param> |
| 23 | /// <returns>Command if the command-line arguments can be parsed, otherwise null.</returns> |
| 24 | ICommandLineCommand CreateCommand(string commandLine); |
| 25 | |
| 26 | /// <summary> |
| 27 | /// Creates a command from populated arguments. |
| 28 | /// </summary> |
| 29 | /// <param name="arguments">Parsed arguments.</param> |
| 30 | /// <returns>Command if the command-line arguments can be parsed, otherwise null.</returns> |
| 31 | ICommandLineCommand ParseStandardCommandLine(ICommandLineArguments arguments); |
| 32 | } |
| 33 | } |