summaryrefslogtreecommitdiff
path: root/src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs')
-rw-r--r--src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs b/src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs
deleted file mode 100644
index c3989902..00000000
--- a/src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs
+++ /dev/null
@@ -1,56 +0,0 @@
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
3namespace WixToolset.HeatTasks
4{
5 using System;
6 using System.Collections.Generic;
7 using Microsoft.Build.Utilities;
8
9 /// <summary>
10 /// Helper class for appending the command line arguments.
11 /// </summary>
12 public class WixCommandLineBuilder : CommandLineBuilder
13 {
14 /// <summary>
15 /// Append a switch to the command line if the condition is true.
16 /// </summary>
17 /// <param name="switchName">Switch to append.</param>
18 /// <param name="condition">Condition specified by the user.</param>
19 public void AppendIfTrue(string switchName, bool condition)
20 {
21 if (condition)
22 {
23 this.AppendSwitch(switchName);
24 }
25 }
26
27 /// <summary>
28 /// Append a switch to the command line if any values in the array have been specified.
29 /// </summary>
30 /// <param name="switchName">Switch to append.</param>
31 /// <param name="values">Values specified by the user.</param>
32 public void AppendArrayIfNotNull(string switchName, IEnumerable<string> values)
33 {
34 if (values != null)
35 {
36 foreach (var value in values)
37 {
38 this.AppendSwitchIfNotNull(switchName, value);
39 }
40 }
41 }
42
43 /// <summary>
44 /// Append arbitrary text to the command-line if specified.
45 /// </summary>
46 /// <param name="textToAppend">Text to append.</param>
47 public void AppendTextIfNotNull(string textToAppend)
48 {
49 if (!String.IsNullOrWhiteSpace(textToAppend))
50 {
51 this.AppendSpaceIfNotEmpty();
52 this.AppendTextUnquoted(textToAppend);
53 }
54 }
55 }
56}