@joebigelow / wix-1 / commits / 94da334a

Rename Output to WindowsInstallerData

Rob Mensching committed Oct 26, 2019 at 13:35 UTC 94da334adaafa4444fb278991aa01cce58d9f758
8 files changed +30 -60
src/WixToolset.Data/WindowsInstaller/Field.cs
+1 -1
@@ -275,7 +275,7 @@ namespace WixToolset.Data.WindowsInstaller
275 /// <param name="writer">XmlWriter where the Field should persist itself as XML.</param>
276 internal virtual void Write(XmlWriter writer)
277 {
278 - writer.WriteStartElement("field", Output.XmlNamespaceUri);
278 + writer.WriteStartElement("field", WindowsInstallerData.XmlNamespaceUri);
279
280 if (this.Modified)
281 {
src/WixToolset.Data/WindowsInstaller/ObjectField.cs
+1 -1
@@ -130,7 +130,7 @@ namespace WixToolset.Data.WindowsInstaller
130 /// <param name="writer">XmlWriter where the Field should persist itself as XML.</param>
131 internal override void Write(XmlWriter writer)
132 {
133 - writer.WriteStartElement("field", Output.XmlNamespaceUri);
133 + writer.WriteStartElement("field", WindowsInstallerData.XmlNamespaceUri);
134
135 if (this.EmbeddedFileIndex.HasValue)
136 {
src/WixToolset.Data/WindowsInstaller/Row.cs
+1 -1
@@ -354,7 +354,7 @@ namespace WixToolset.Data.WindowsInstaller
354 /// <param name="writer">XmlWriter where the Row should persist itself as XML.</param>
355 internal void Write(XmlWriter writer)
356 {
357 - writer.WriteStartElement("row", Output.XmlNamespaceUri);
357 + writer.WriteStartElement("row", WindowsInstallerData.XmlNamespaceUri);
358
359 if (RowOperation.None != this.Operation)
360 {
src/WixToolset.Data/WindowsInstaller/SubStorage.cs
+6 -6
@@ -14,7 +14,7 @@ namespace WixToolset.Data.WindowsInstaller
14 /// </summary>
15 /// <param name="name">The substorage name.</param>
16 /// <param name="data">The substorage data.</param>
17 - public SubStorage(string name, Output data)
17 + public SubStorage(string name, WindowsInstallerData data)
18 {
19 this.Name = name;
20 this.Data = data;
@@ -30,7 +30,7 @@ namespace WixToolset.Data.WindowsInstaller
30 /// Gets the substorage data.
31 /// </summary>
32 /// <value>The substorage data.</value>
33 - public Output Data { get; }
33 + public WindowsInstallerData Data { get; }
34
35 /// <summary>
36 /// Creates a SubStorage from the XmlReader.
@@ -44,7 +44,7 @@ namespace WixToolset.Data.WindowsInstaller
44 throw new XmlException();
45 }
46
47 - Output data = null;
47 + WindowsInstallerData data = null;
48 bool empty = reader.IsEmptyElement;
49 string name = null;
50
@@ -69,8 +69,8 @@ namespace WixToolset.Data.WindowsInstaller
69 case XmlNodeType.Element:
70 switch (reader.LocalName)
71 {
72 - case "wixOutput":
73 - data = Output.Read(reader, true);
72 + case WindowsInstallerData.XmlElementName:
73 + data = WindowsInstallerData.Read(reader, true);
74 break;
75 default:
76 throw new XmlException();
@@ -97,7 +97,7 @@ namespace WixToolset.Data.WindowsInstaller
97 /// <param name="writer">XmlWriter where the SubStorage should persist itself as XML.</param>
98 internal void Write(XmlWriter writer)
99 {
100 - writer.WriteStartElement("subStorage", Output.XmlNamespaceUri);
100 + writer.WriteStartElement("subStorage", WindowsInstallerData.XmlNamespaceUri);
101
102 writer.WriteAttributeString("name", this.Name);
103
src/WixToolset.Data/WindowsInstaller/Table.cs
+1 -1
@@ -291,7 +291,7 @@ namespace WixToolset.Data.WindowsInstaller
291 throw new ArgumentNullException("writer");
292 }
293
294 - writer.WriteStartElement("table", Output.XmlNamespaceUri);
294 + writer.WriteStartElement("table", WindowsInstallerData.XmlNamespaceUri);
295 writer.WriteAttributeString("name", this.Name);
296
297 if (TableOperation.None != this.Operation)
src/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs renamed
+15 -13
@@ -11,17 +11,19 @@ namespace WixToolset.Data.WindowsInstaller
11 /// <summary>
12 /// Output is generated by the linker.
13 /// </summary>
14 - public sealed class Output
14 + public sealed class WindowsInstallerData
15 {
16 - public const string XmlNamespaceUri = "http://wixtoolset.org/schemas/v4/wixout";
16 + internal const string XmlNamespaceUri = "http://wixtoolset.org/schemas/v4/windowsinstallerdata";
17 + internal const string XmlElementName = "windowsInstallerData";
18 +
19 private static readonly Version CurrentVersion = new Version("4.0.0.0");
18 - private const string WixOutputStreamName = "wix-wi.xml";
20 + private const string WixOutputStreamName = "wix-wid.xml";
21
22 /// <summary>
23 /// Creates a new empty output object.
24 /// </summary>
25 /// <param name="sourceLineNumbers">The source line information for the output.</param>
24 - public Output(SourceLineNumber sourceLineNumbers)
26 + public WindowsInstallerData(SourceLineNumber sourceLineNumbers)
27 {
28 this.SourceLineNumbers = sourceLineNumbers;
29 this.SubStorages = new List<SubStorage>();
@@ -64,7 +66,7 @@ namespace WixToolset.Data.WindowsInstaller
66 /// <param name="path">Path to output file saved on disk.</param>
67 /// <param name="suppressVersionCheck">Suppresses wix.dll version mismatch check.</param>
68 /// <returns>Output object.</returns>
67 - public static Output Load(string path, bool suppressVersionCheck)
69 + public static WindowsInstallerData Load(string path, bool suppressVersionCheck)
70 {
71 using (var wixout = WixOutput.Read(path))
72 using (var stream = wixout.GetDataStream(WixOutputStreamName))
@@ -73,7 +75,7 @@ namespace WixToolset.Data.WindowsInstaller
75 try
76 {
77 reader.MoveToContent();
76 - return Output.Read(reader, suppressVersionCheck);
78 + return WindowsInstallerData.Read(reader, suppressVersionCheck);
79 }
80 catch (XmlException xe)
81 {
@@ -102,15 +104,15 @@ namespace WixToolset.Data.WindowsInstaller
104 /// <param name="reader">Reader to get data from.</param>
105 /// <param name="suppressVersionCheck">Suppresses wix.dll version mismatch check.</param>
106 /// <returns>The Output represented by the Xml.</returns>
105 - internal static Output Read(XmlReader reader, bool suppressVersionCheck)
107 + internal static WindowsInstallerData Read(XmlReader reader, bool suppressVersionCheck)
108 {
107 - if (!reader.LocalName.Equals("wixOutput"))
109 + if (!reader.LocalName.Equals(WindowsInstallerData.XmlElementName))
110 {
111 throw new XmlException();
112 }
113
114 var empty = reader.IsEmptyElement;
113 - var output = new Output(SourceLineNumber.CreateFromUri(reader.BaseURI));
115 + var output = new WindowsInstallerData(SourceLineNumber.CreateFromUri(reader.BaseURI));
116 Version version = null;
117
118 while (reader.MoveToNextAttribute())
@@ -151,9 +153,9 @@ namespace WixToolset.Data.WindowsInstaller
153 }
154 }
155
154 - if (!suppressVersionCheck && null != version && !Output.CurrentVersion.Equals(version))
156 + if (!suppressVersionCheck && null != version && !WindowsInstallerData.CurrentVersion.Equals(version))
157 {
156 - throw new WixException(ErrorMessages.VersionMismatch(SourceLineNumber.CreateFromUri(reader.BaseURI), "wixOutput", version.ToString(), Output.CurrentVersion.ToString()));
158 + throw new WixException(ErrorMessages.VersionMismatch(SourceLineNumber.CreateFromUri(reader.BaseURI), WindowsInstallerData.XmlElementName, version.ToString(), WindowsInstallerData.CurrentVersion.ToString()));
159 }
160
161 // loop through the rest of the xml building up the Output object
@@ -227,7 +229,7 @@ namespace WixToolset.Data.WindowsInstaller
229 /// <param name="writer">XmlWriter where the Output should persist itself as XML.</param>
230 internal void Write(XmlWriter writer)
231 {
230 - writer.WriteStartElement("wixOutput", XmlNamespaceUri);
232 + writer.WriteStartElement(WindowsInstallerData.XmlElementName, XmlNamespaceUri);
233
234 writer.WriteAttributeString("type", this.Type.ToString());
235
@@ -236,7 +238,7 @@ namespace WixToolset.Data.WindowsInstaller
238 writer.WriteAttributeString("codepage", this.Codepage.ToString(CultureInfo.InvariantCulture));
239 }
240
239 - writer.WriteAttributeString("version", Output.CurrentVersion.ToString());
241 + writer.WriteAttributeString("version", WindowsInstallerData.CurrentVersion.ToString());
242
243 // Collect all the table definitions and write them.
244 var tableDefinitions = new TableDefinitionCollection();
src/WixToolset.Data/WindowsInstaller/Xsd/data.xsd renamed
+5 -5
@@ -3,20 +3,20 @@
3
4
5 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
6 - targetNamespace="http://wixtoolset.org/schemas/v4/wixout"
7 - xmlns="http://wixtoolset.org/schemas/v4/wixout"
6 + targetNamespace="http://wixtoolset.org/schemas/v4/windowsinstallerdata"
7 + xmlns="http://wixtoolset.org/schemas/v4/windowsinstallerdata"
8 xmlns:objs="http://wixtoolset.org/schemas/v4/wixobj"
9 xmlns:tbls="http://wixtoolset.org/schemas/v4/wi/tables">
10 <xs:annotation>
11 <xs:documentation>
12 - Schema for describing WiX Output files (.wixout).
12 + Schema for describing WiX Windows Installer Data files.
13 </xs:documentation>
14 </xs:annotation>
15
16 <xs:import namespace="http://wixtoolset.org/schemas/v4/wixobj" schemaLocation="objects.xsd" />
17 <xs:import namespace="http://wixtoolset.org/schemas/v4/wi/tables" schemaLocation="tables.xsd" />
18
19 - <xs:element name="wixOutput">
19 + <xs:element name="windowsInstallerData">
20 <xs:complexType>
21 <xs:sequence>
22 <xs:element ref="tbls:tableDefinitions" />
@@ -54,7 +54,7 @@
54 <xs:element name="subStorage">
55 <xs:complexType>
56 <xs:sequence minOccurs="1" maxOccurs="1">
57 - <xs:element ref="wixOutput" />
57 + <xs:element ref="windowsInstallerData" />
58 </xs:sequence>
59 <xs:attribute name="name" type="xs:string">
60 <xs:annotation>
src/WixToolset.Data/WindowsInstaller/Xsd/pdbs.xsd deleted
-32
@@ -1,32 +0,0 @@
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<!-- 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. -->
3 -
4 -
5 -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
6 - targetNamespace="http://wixtoolset.org/schemas/v4/wixpdb"
7 - xmlns="http://wixtoolset.org/schemas/v4/wixpdb"
8 - xmlns:outs="http://wixtoolset.org/schemas/v4/wixout">
9 - <xs:annotation>
10 - <xs:documentation>
11 - Schema for describing WiX Pdb files (.wixpdb).
12 - </xs:documentation>
13 - </xs:annotation>
14 -
15 - <xs:import namespace="http://wixtoolset.org/schemas/v4/wixobj" schemaLocation="objects.xsd" />
16 - <xs:import namespace="http://wixtoolset.org/schemas/v4/wixout" schemaLocation="outputs.xsd" />
17 - <xs:import namespace="http://wixtoolset.org/schemas/v4/wi/tables" schemaLocation="tables.xsd" />
18 -
19 - <xs:element name="wixPdb">
20 - <xs:complexType>
21 - <xs:sequence>
22 - <xs:element ref="outs:wixOutput" minOccurs="0" maxOccurs="unbounded" />
23 - </xs:sequence>
24 -
25 - <xs:attribute name="version" type="xs:string" use="required">
26 - <xs:annotation>
27 - <xs:documentation>Version of WiX used to create this pdb file</xs:documentation>
28 - </xs:annotation>
29 - </xs:attribute>
30 - </xs:complexType>
31 - </xs:element>
32 -</xs:schema>