From 3abf00a71151d1caef6e853a2f330d7691f4abf8 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Thu, 24 Apr 2025 21:32:49 -0400 Subject: Remove deprecated Heat. Fixes https://github.com/wixtoolset/issues/issues/9039 --- src/tools/heat/UtilTransformMutator.cs | 77 ---------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 src/tools/heat/UtilTransformMutator.cs (limited to 'src/tools/heat/UtilTransformMutator.cs') diff --git a/src/tools/heat/UtilTransformMutator.cs b/src/tools/heat/UtilTransformMutator.cs deleted file mode 100644 index 2d3f2bb0..00000000 --- a/src/tools/heat/UtilTransformMutator.cs +++ /dev/null @@ -1,77 +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.Harvesters -{ - using System; - using System.IO; - using System.Xml; - using System.Xml.Xsl; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - - public sealed class UtilTransformMutator : BaseMutatorExtension - { - private string transform; - private int transformSequence; - - /// - /// Instantiate a new UtilTransformMutator. - /// - /// Path to the XSL transform file. - /// Order in which the transform should be applied, - /// relative to other transforms. - public UtilTransformMutator(string transform, int transformSequence) - { - this.transform = transform; - this.transformSequence = transformSequence; - } - - /// - /// Gets the sequence of the extension. - /// - /// The sequence of the extension. - public override int Sequence - { - get { return 3000 + this.transformSequence; } - } - - /// - /// Mutate a WiX document as a string. - /// - /// The Wix document element as a string. - /// The mutated Wix document as a string. - public override string Mutate(string wixString) - { - try - { - XslCompiledTransform xslt = new XslCompiledTransform(); - xslt.Load(this.transform, XsltSettings.TrustedXslt, new XmlUrlResolver()); - - using (XmlTextReader xmlReader = new XmlTextReader(new StringReader(wixString))) - { - using (StringWriter stringWriter = new StringWriter()) - { - XmlWriterSettings xmlSettings = new XmlWriterSettings(); - xmlSettings.Indent = true; - xmlSettings.IndentChars = " "; - xmlSettings.OmitXmlDeclaration = true; - - using (XmlWriter xmlWriter = XmlWriter.Create(stringWriter, xmlSettings)) - { - xslt.Transform(xmlReader, xmlWriter); - } - - wixString = stringWriter.ToString(); - } - } - } - catch (Exception ex) - { - this.Core.Messaging.Write(HarvesterErrors.ErrorTransformingHarvestedWiX(this.transform, ex.Message)); - return null; - } - - return wixString; - } - } -} -- cgit v1.2.3-55-g6feb