From 49f1209035aac1fcfad5dbbe25f7b2306d3be86c Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 7 Dec 2017 14:19:05 -0800 Subject: Support MSI backends creating custom tables and remove WixToolset.Data.WindowsInstaller --- src/WixToolset.Data.WindowsInstaller/SubStorage.cs | 109 --------------------- 1 file changed, 109 deletions(-) delete mode 100644 src/WixToolset.Data.WindowsInstaller/SubStorage.cs (limited to 'src/WixToolset.Data.WindowsInstaller/SubStorage.cs') diff --git a/src/WixToolset.Data.WindowsInstaller/SubStorage.cs b/src/WixToolset.Data.WindowsInstaller/SubStorage.cs deleted file mode 100644 index e136bfe9..00000000 --- a/src/WixToolset.Data.WindowsInstaller/SubStorage.cs +++ /dev/null @@ -1,109 +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.Data -{ - using System.Xml; - - /// - /// Substorage inside an output. - /// - public sealed class SubStorage - { - /// - /// Instantiate a new substorage. - /// - /// The substorage name. - /// The substorage data. - public SubStorage(string name, Output data) - { - this.Name = name; - this.Data = data; - } - - /// - /// Gets the substorage name. - /// - /// The substorage name. - public string Name { get; private set; } - - /// - /// Gets the substorage data. - /// - /// The substorage data. - public Output Data { get; private set; } - - /// - /// Creates a SubStorage from the XmlReader. - /// - /// Reader to get data from. - /// New SubStorage object. - internal static SubStorage Read(XmlReader reader) - { - if (!reader.LocalName.Equals("subStorage" == reader.LocalName)) - { - throw new XmlException(); - } - - Output data = null; - bool empty = reader.IsEmptyElement; - string name = null; - - while (reader.MoveToNextAttribute()) - { - switch (reader.LocalName) - { - case "name": - name = reader.Value; - break; - } - } - - if (!empty) - { - bool done = false; - - while (!done && reader.Read()) - { - switch (reader.NodeType) - { - case XmlNodeType.Element: - switch (reader.LocalName) - { - case "wixOutput": - data = Output.Read(reader, true); - break; - default: - throw new XmlException(); - } - break; - case XmlNodeType.EndElement: - done = true; - break; - } - } - - if (!done) - { - throw new XmlException(); - } - } - - return new SubStorage(name, data); - } - - /// - /// Persists a SubStorage in an XML format. - /// - /// XmlWriter where the SubStorage should persist itself as XML. - internal void Write(XmlWriter writer) - { - writer.WriteStartElement("subStorage", Output.XmlNamespaceUri); - - writer.WriteAttributeString("name", this.Name); - - this.Data.Write(writer); - - writer.WriteEndElement(); - } - } -} -- cgit v1.2.3-55-g6feb