From 2724cfee4c163f3297ee25edfd2372767cfd4945 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 19 Jul 2018 00:58:00 -0700 Subject: Move tool projects to Tools repo --- src/WixToolset.BuildTasks/ReplaceString.cs | 54 ------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 src/WixToolset.BuildTasks/ReplaceString.cs (limited to 'src/WixToolset.BuildTasks/ReplaceString.cs') diff --git a/src/WixToolset.BuildTasks/ReplaceString.cs b/src/WixToolset.BuildTasks/ReplaceString.cs deleted file mode 100644 index e5041923..00000000 --- a/src/WixToolset.BuildTasks/ReplaceString.cs +++ /dev/null @@ -1,54 +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.BuildTasks -{ - using System; - using Microsoft.Build.Framework; - using Microsoft.Build.Utilities; - - /// - /// Replaces occurances of OldValues with NewValues in String. - /// - public class ReplaceString : Task - { - /// - /// Text to operate on. - /// - [Output] - [Required] - public string Text { get; set; } - - /// - /// List of old values to replace. - /// - [Required] - public string OldValue { get; set; } - - /// - /// List of new values to replace old values with. If not specified, occurances of OldValue will be removed. - /// - public string NewValue { get; set; } - - /// - /// Does the string replacement. - /// - /// - public override bool Execute() - { - if (String.IsNullOrEmpty(this.Text)) - { - return true; - } - - if (String.IsNullOrEmpty(this.OldValue)) - { - Log.LogError("OldValue must be specified"); - return false; - } - - this.Text = this.Text.Replace(this.OldValue, this.NewValue); - - return true; - } - } -} -- cgit v1.2.3-55-g6feb