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/Common.cs | 41 ------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 src/WixToolset.BuildTasks/Common.cs (limited to 'src/WixToolset.BuildTasks/Common.cs') diff --git a/src/WixToolset.BuildTasks/Common.cs b/src/WixToolset.BuildTasks/Common.cs deleted file mode 100644 index 803e9d14..00000000 --- a/src/WixToolset.BuildTasks/Common.cs +++ /dev/null @@ -1,41 +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 -{ - using System; - using System.Globalization; - using System.Text; - using System.Text.RegularExpressions; - - /// - /// Common WixTasks utility methods and types. - /// - internal static class Common - { - /// Metadata key name to turn off harvesting of project references. - public const string DoNotHarvest = "DoNotHarvest"; - - private static readonly Regex AddPrefix = new Regex(@"^[^a-zA-Z_]", RegexOptions.Compiled); - private static readonly Regex IllegalIdentifierCharacters = new Regex(@"[^A-Za-z0-9_\.]|\.{2,}", RegexOptions.Compiled); // non 'words' and assorted valid characters - - /// - /// Return an identifier based on passed file/directory name - /// - /// File/directory name to generate identifer from - /// A version of the name that is a legal identifier. - /// This is duplicated from WiX's Common class. - internal static string GetIdentifierFromName(string name) - { - string result = IllegalIdentifierCharacters.Replace(name, "_"); // replace illegal characters with "_". - - // MSI identifiers must begin with an alphabetic character or an - // underscore. Prefix all other values with an underscore. - if (AddPrefix.IsMatch(name)) - { - result = String.Concat("_", result); - } - - return result; - } - } -} -- cgit v1.2.3-55-g6feb