diff options
Diffstat (limited to 'src/internal/WixInternal.BaseBuildTasks.Sources')
| -rw-r--r-- | src/internal/WixInternal.BaseBuildTasks.Sources/WixCommandLineBuilder.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/internal/WixInternal.BaseBuildTasks.Sources/WixCommandLineBuilder.cs b/src/internal/WixInternal.BaseBuildTasks.Sources/WixCommandLineBuilder.cs index d950bca9..61d7095d 100644 --- a/src/internal/WixInternal.BaseBuildTasks.Sources/WixCommandLineBuilder.cs +++ b/src/internal/WixInternal.BaseBuildTasks.Sources/WixCommandLineBuilder.cs | |||
| @@ -76,6 +76,26 @@ namespace WixToolset.BaseBuildTasks | |||
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | /// <summary> | 78 | /// <summary> |
| 79 | /// Append a switch to the command-line for each value in a split text. | ||
| 80 | /// </summary> | ||
| 81 | /// <param name="switchName">Switch to append.</param> | ||
| 82 | /// <param name="values">Text to split and append.</param> | ||
| 83 | /// <param name="split">Character to use to split the string</param> | ||
| 84 | public void AppendTextAsArray(string switchName, string values, char splitter = ';') | ||
| 85 | { | ||
| 86 | if (!String.IsNullOrEmpty(values)) | ||
| 87 | { | ||
| 88 | foreach (string value in values.Split([ splitter ], StringSplitOptions.RemoveEmptyEntries)) | ||
| 89 | { | ||
| 90 | if (!String.IsNullOrWhiteSpace(value)) | ||
| 91 | { | ||
| 92 | this.AppendSwitchIfNotNull(switchName, value.Trim()); | ||
| 93 | } | ||
| 94 | } | ||
| 95 | } | ||
| 96 | } | ||
| 97 | |||
| 98 | /// <summary> | ||
| 79 | /// Append arbitrary text to the command-line if specified. | 99 | /// Append arbitrary text to the command-line if specified. |
| 80 | /// </summary> | 100 | /// </summary> |
| 81 | /// <param name="textToAppend">Text to append.</param> | 101 | /// <param name="textToAppend">Text to append.</param> |
