From c843b47d6233153fa961c6d0e61edf7cedf255bb Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 8 Nov 2022 14:58:05 -0800 Subject: Separate WixInternal content from official WixToolset namespace --- .../WixCommandLineBuilder.cs | 104 --------------------- 1 file changed, 104 deletions(-) delete mode 100644 src/internal/WixToolset.BaseBuildTasks.Sources/WixCommandLineBuilder.cs (limited to 'src/internal/WixToolset.BaseBuildTasks.Sources/WixCommandLineBuilder.cs') diff --git a/src/internal/WixToolset.BaseBuildTasks.Sources/WixCommandLineBuilder.cs b/src/internal/WixToolset.BaseBuildTasks.Sources/WixCommandLineBuilder.cs deleted file mode 100644 index d950bca9..00000000 --- a/src/internal/WixToolset.BaseBuildTasks.Sources/WixCommandLineBuilder.cs +++ /dev/null @@ -1,104 +0,0 @@ -// 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. - -namespace WixToolset.BaseBuildTasks -{ - using System; - using System.Collections.Generic; - using System.Globalization; - using System.IO; - - using Microsoft.Build.Framework; - using Microsoft.Build.Utilities; - - /// - /// Helper class for appending the command line arguments. - /// - public class WixCommandLineBuilder : CommandLineBuilder - { - internal const int Unspecified = -1; - - /// - /// Append a switch to the command line if the value has been specified. - /// - /// Switch to append. - /// Value specified by the user. - public void AppendIfSpecified(string switchName, int value) - { - if (value != Unspecified) - { - this.AppendSwitchIfNotNull(switchName, value.ToString(CultureInfo.InvariantCulture)); - } - } - - /// - /// Append a switch to the command line if the condition is true. - /// - /// Switch to append. - /// Condition specified by the user. - public void AppendIfTrue(string switchName, bool condition) - { - if (condition) - { - this.AppendSwitch(switchName); - } - } - - /// - /// Append a switch to the command line if any values in the array have been specified. - /// - /// Switch to append. - /// Values specified by the user. - public void AppendArrayIfNotNull(string switchName, IEnumerable values) - { - if (values != null) - { - foreach (ITaskItem value in values) - { - this.AppendSwitchIfNotNull(switchName, value); - } - } - } - - /// - /// Append a switch to the command line if any values in the array have been specified. - /// - /// Switch to append. - /// Values specified by the user. - public void AppendArrayIfNotNull(string switchName, IEnumerable values) - { - if (values != null) - { - foreach (string value in values) - { - this.AppendSwitchIfNotNull(switchName, value); - } - } - } - - /// - /// Append arbitrary text to the command-line if specified. - /// - /// Text to append. - public void AppendTextIfNotNull(string textToAppend) - { - if (!String.IsNullOrEmpty(textToAppend)) - { - this.AppendSpaceIfNotEmpty(); - this.AppendTextUnquoted(textToAppend); - } - } - - /// - /// Append arbitrary text to the command-line if specified. - /// - /// Text to append. - public void AppendTextIfNotWhitespace(string textToAppend) - { - if (!String.IsNullOrWhiteSpace(textToAppend)) - { - this.AppendSpaceIfNotEmpty(); - this.AppendTextUnquoted(textToAppend); - } - } - } -} -- cgit v1.2.3-55-g6feb