diff options
| author | Rob Mensching <rob@firegiant.com> | 2022-02-25 22:24:52 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2022-02-28 16:56:09 -0800 |
| commit | aa201d92d19cca21bd2456e006a9eb51acafa0e9 (patch) | |
| tree | f7cfb71fc177fa91d26d6921d6e3a2c9bafa2c49 /src | |
| parent | 5fd804165587b3b6d2bd6b9844dcb3fa55a4a305 (diff) | |
| download | wix-aa201d92d19cca21bd2456e006a9eb51acafa0e9.tar.gz wix-aa201d92d19cca21bd2456e006a9eb51acafa0e9.tar.bz2 wix-aa201d92d19cca21bd2456e006a9eb51acafa0e9.zip | |
Minor code cleanup
Diffstat (limited to 'src')
| -rw-r--r-- | src/wix/WixToolset.Core/CommandLine/CommandLineArguments.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/wix/WixToolset.Core/CommandLine/CommandLineArguments.cs b/src/wix/WixToolset.Core/CommandLine/CommandLineArguments.cs index 40b8b320..0e807be1 100644 --- a/src/wix/WixToolset.Core/CommandLine/CommandLineArguments.cs +++ b/src/wix/WixToolset.Core/CommandLine/CommandLineArguments.cs | |||
| @@ -41,7 +41,10 @@ namespace WixToolset.Core.CommandLine | |||
| 41 | this.ProcessArgumentsAndParseExtensions(this.OriginalArguments); | 41 | this.ProcessArgumentsAndParseExtensions(this.OriginalArguments); |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | public ICommandLineParser Parse() => new CommandLineParser(this.Messaging, this.Arguments, this.ErrorArgument); | 44 | public ICommandLineParser Parse() |
| 45 | { | ||
| 46 | return new CommandLineParser(this.Messaging, this.Arguments, this.ErrorArgument); | ||
| 47 | } | ||
| 45 | 48 | ||
| 46 | private void FlattenArgumentsWithResponseFilesIntoOriginalArguments(string[] commandLineArguments) | 49 | private void FlattenArgumentsWithResponseFilesIntoOriginalArguments(string[] commandLineArguments) |
| 47 | { | 50 | { |
| @@ -49,7 +52,7 @@ namespace WixToolset.Core.CommandLine | |||
| 49 | 52 | ||
| 50 | foreach (var arg in commandLineArguments) | 53 | foreach (var arg in commandLineArguments) |
| 51 | { | 54 | { |
| 52 | if (arg != null) | 55 | if (!String.IsNullOrEmpty(arg)) |
| 53 | { | 56 | { |
| 54 | if ('@' == arg[0]) | 57 | if ('@' == arg[0]) |
| 55 | { | 58 | { |
| @@ -202,6 +205,9 @@ namespace WixToolset.Core.CommandLine | |||
| 202 | return arguments; | 205 | return arguments; |
| 203 | } | 206 | } |
| 204 | 207 | ||
| 205 | private static bool IsSwitchAt(string[] args, int index) => args.Length > index && !String.IsNullOrEmpty(args[index]) && ('/' == args[index][0] || '-' == args[index][0]); | 208 | private static bool IsSwitchAt(string[] args, int index) |
| 209 | { | ||
| 210 | return args.Length > index && !String.IsNullOrEmpty(args[index]) && ('/' == args[index][0] || '-' == args[index][0]); | ||
| 211 | } | ||
| 206 | } | 212 | } |
| 207 | } | 213 | } |
