diff options
Diffstat (limited to 'src/WixToolset.Core/CommandLine/CommandLineParser.cs')
-rw-r--r-- | src/WixToolset.Core/CommandLine/CommandLineParser.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/WixToolset.Core/CommandLine/CommandLineParser.cs b/src/WixToolset.Core/CommandLine/CommandLineParser.cs index e78da47e..015d3e62 100644 --- a/src/WixToolset.Core/CommandLine/CommandLineParser.cs +++ b/src/WixToolset.Core/CommandLine/CommandLineParser.cs | |||
@@ -12,7 +12,7 @@ namespace WixToolset.Core.CommandLine | |||
12 | { | 12 | { |
13 | private const string ExpectedArgument = "expected argument"; | 13 | private const string ExpectedArgument = "expected argument"; |
14 | 14 | ||
15 | public string ErrorArgument { get; set; } | 15 | public string ErrorArgument { get; private set; } |
16 | 16 | ||
17 | private Queue<string> RemainingArguments { get; } | 17 | private Queue<string> RemainingArguments { get; } |
18 | 18 | ||
@@ -122,6 +122,12 @@ namespace WixToolset.Core.CommandLine | |||
122 | return false; | 122 | return false; |
123 | } | 123 | } |
124 | 124 | ||
125 | public void ReportErrorArgument(string argument, Message message = null) | ||
126 | { | ||
127 | this.Messaging.Write(message ?? ErrorMessages.AdditionalArgumentUnexpected(argument)); | ||
128 | this.ErrorArgument = argument; | ||
129 | } | ||
130 | |||
125 | public bool TryGetNextSwitchOrArgument(out string arg) | 131 | public bool TryGetNextSwitchOrArgument(out string arg) |
126 | { | 132 | { |
127 | if (this.RemainingArguments.Count > 0) | 133 | if (this.RemainingArguments.Count > 0) |