diff options
| author | Rob Mensching <rob@firegiant.com> | 2018-10-24 21:02:24 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@robmensching.com> | 2018-10-24 21:17:34 -0700 |
| commit | a5c63c90a02665267c11c8bf2c653fd6db8d0107 (patch) | |
| tree | ebd38c870168ec613bc36b0ddf9d34d9e6e78b8e /src/test | |
| parent | 0ecb2ac1ba28d33b0b3d17a2d7134d2f5485814d (diff) | |
| download | wix-a5c63c90a02665267c11c8bf2c653fd6db8d0107.tar.gz wix-a5c63c90a02665267c11c8bf2c653fd6db8d0107.tar.bz2 wix-a5c63c90a02665267c11c8bf2c653fd6db8d0107.zip | |
Update to command-line parsing re-organization
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/Example.Extension/ExamplePreprocessorExtensionAndCommandLine.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/test/Example.Extension/ExamplePreprocessorExtensionAndCommandLine.cs b/src/test/Example.Extension/ExamplePreprocessorExtensionAndCommandLine.cs index 8fed7944..eddcf6e4 100644 --- a/src/test/Example.Extension/ExamplePreprocessorExtensionAndCommandLine.cs +++ b/src/test/Example.Extension/ExamplePreprocessorExtensionAndCommandLine.cs | |||
| @@ -1,4 +1,4 @@ | |||
| 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 Example.Extension | 3 | namespace Example.Extension |
| 4 | { | 4 | { |
| @@ -23,17 +23,23 @@ namespace Example.Extension | |||
| 23 | { | 23 | { |
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | public bool TryParseArgument(IParseCommandLine parseCommandLine, string arg) | 26 | public bool TryParseArgument(ICommandLineParser parser, string argument) |
| 27 | { | 27 | { |
| 28 | if (parseCommandLine.IsSwitch(arg) && arg.Substring(1).Equals("example", StringComparison.OrdinalIgnoreCase)) | 28 | if (parser.IsSwitch(argument) && argument.Substring(1).Equals("example", StringComparison.OrdinalIgnoreCase)) |
| 29 | { | 29 | { |
| 30 | this.exampleValueFromCommandLine = parseCommandLine.GetNextArgumentOrError(arg); | 30 | this.exampleValueFromCommandLine = parser.GetNextArgumentOrError(argument); |
| 31 | return true; | 31 | return true; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | return false; | 34 | return false; |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | public bool TryParseCommand(ICommandLineParser parser, out ICommandLineCommand command) | ||
| 38 | { | ||
| 39 | command = null; | ||
| 40 | return false; | ||
| 41 | } | ||
| 42 | |||
| 37 | public void PostParse() | 43 | public void PostParse() |
| 38 | { | 44 | { |
| 39 | } | 45 | } |
