@joebigelow / wix-1 / commits / c1ebab94

Add XmlWriter overload.

- Also fix some typos.

Bob Arnson committed Mar 24, 2020 at 13:49 UTC c1ebab9485256e5fbf4f47d20be8627fd03c68a1
2 files changed +16 -7
src/WixToolset.Data/WindowsInstaller/Rows/PropertyRow.cs
+4 -4
@@ -3,12 +3,12 @@
3 namespace WixToolset.Data.WindowsInstaller.Rows
4 {
5 /// <summary>
6 - /// Specialization of a row for the upgrade table.
6 + /// Specialization of a row for the Property table.
7 /// </summary>
8 public sealed class PropertyRow : Row
9 {
10 /// <summary>
11 - /// Creates an Upgrade row that belongs to a table.
11 + /// Creates an Property row that belongs to a table.
12 /// </summary>
13 /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14 /// <param name="table">Table this Upgrade row belongs to and should get its column definitions from.</param>
@@ -18,7 +18,7 @@ namespace WixToolset.Data.WindowsInstaller.Rows
18 }
19
20 /// <summary>
21 - /// Gets and sets the upgrade code for the row.
21 + /// Gets and sets the property name for the row.
22 /// </summary>
23 /// <value>Property identifier for the row.</value>
24 public string Property
@@ -28,7 +28,7 @@ namespace WixToolset.Data.WindowsInstaller.Rows
28 }
29
30 /// <summary>
31 - /// Gets and sets the value for the row.
31 + /// Gets and sets the property value for the row.
32 /// </summary>
33 /// <value>Property value for the row.</value>
34 public string Value
src/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs
+12 -3
@@ -85,12 +85,21 @@ namespace WixToolset.Data.WindowsInstaller
85 {
86 using (var writer = XmlWriter.Create(wixout.CreateDataStream(WixOutputStreamName)))
87 {
88 - writer.WriteStartDocument();
89 - this.Write(writer);
90 - writer.WriteEndDocument();
88 + this.Save(writer);
89 }
90 }
91
92 + /// <summary>
93 + /// Saves an output to an <c>XmlWriter</c>.
94 + /// </summary>
95 + /// <param name="wixout">XmlWriter to save to.</param>
96 + public void Save(XmlWriter writer)
97 + {
98 + writer.WriteStartDocument();
99 + this.Write(writer);
100 + writer.WriteEndDocument();
101 + }
102 +
103 /// <summary>
104 /// Gets table by name.
105 /// </summary>