diff options
Diffstat (limited to 'src/WixToolset.Extensibility/Services/ICommandLineParser.cs')
| -rw-r--r-- | src/WixToolset.Extensibility/Services/ICommandLineParser.cs | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/src/WixToolset.Extensibility/Services/ICommandLineParser.cs b/src/WixToolset.Extensibility/Services/ICommandLineParser.cs index 60507c6c..f7e2a28f 100644 --- a/src/WixToolset.Extensibility/Services/ICommandLineParser.cs +++ b/src/WixToolset.Extensibility/Services/ICommandLineParser.cs | |||
| @@ -1,15 +1,36 @@ | |||
| 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. | 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 | 2 | ||
| 3 | namespace WixToolset.Extensibility.Services | 3 | namespace WixToolset.Extensibility.Services |
| 4 | { | 4 | { |
| 5 | using WixToolset.Extensibility.Data; | 5 | using System.Collections.Generic; |
| 6 | 6 | ||
| 7 | public interface ICommandLineParser | 7 | public interface ICommandLineParser |
| 8 | { | 8 | { |
| 9 | IExtensionManager ExtensionManager { get; set; } | 9 | string ErrorArgument { get; set; } |
| 10 | 10 | ||
| 11 | ICommandLineArguments Arguments { get; set; } | 11 | /// <summary> |
| 12 | /// Validates that a valid switch (starts with "/" or "-"), and returns a bool indicating its validity | ||
| 13 | /// </summary> | ||
| 14 | /// <param name="arg">The string check.</param> | ||
| 15 | /// <returns>True if a valid switch, otherwise false.</returns> | ||
| 16 | bool IsSwitch(string arg); | ||
| 12 | 17 | ||
| 13 | ICommandLineCommand ParseStandardCommandLine(); | 18 | string GetArgumentAsFilePathOrError(string argument, string fileType); |
| 19 | |||
| 20 | void GetArgumentAsFilePathOrError(string argument, string fileType, IList<string> paths); | ||
| 21 | |||
| 22 | string GetNextArgumentOrError(string commandLineSwitch); | ||
| 23 | |||
| 24 | bool GetNextArgumentOrError(string commandLineSwitch, IList<string> argument); | ||
| 25 | |||
| 26 | string GetNextArgumentAsDirectoryOrError(string commandLineSwitch); | ||
| 27 | |||
| 28 | bool GetNextArgumentAsDirectoryOrError(string commandLineSwitch, IList<string> directories); | ||
| 29 | |||
| 30 | string GetNextArgumentAsFilePathOrError(string commandLineSwitch); | ||
| 31 | |||
| 32 | bool GetNextArgumentAsFilePathOrError(string commandLineSwitch, string fileType, IList<string> paths); | ||
| 33 | |||
| 34 | bool TryGetNextSwitchOrArgument(out string arg); | ||
| 14 | } | 35 | } |
| 15 | } | 36 | } |
