aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2020-03-24 13:49:28 -0400
committerBob Arnson <bob@firegiant.com>2020-03-24 13:52:05 -0400
commitc1ebab9485256e5fbf4f47d20be8627fd03c68a1 (patch)
treee02cbb480ad545cae1af727f9c025cd3c33a812d /src/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs
parent9240b527b9b204764830b578ef41a5b880a0bda4 (diff)
downloadwix-c1ebab9485256e5fbf4f47d20be8627fd03c68a1.tar.gz
wix-c1ebab9485256e5fbf4f47d20be8627fd03c68a1.tar.bz2
wix-c1ebab9485256e5fbf4f47d20be8627fd03c68a1.zip
Add XmlWriter overload.
- Also fix some typos.
Diffstat (limited to 'src/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs')
-rw-r--r--src/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs b/src/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs
index 43c19d69..e30be598 100644
--- a/src/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs
+++ b/src/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs
@@ -85,13 +85,22 @@ namespace WixToolset.Data.WindowsInstaller
85 { 85 {
86 using (var writer = XmlWriter.Create(wixout.CreateDataStream(WixOutputStreamName))) 86 using (var writer = XmlWriter.Create(wixout.CreateDataStream(WixOutputStreamName)))
87 { 87 {
88 writer.WriteStartDocument(); 88 this.Save(writer);
89 this.Write(writer);
90 writer.WriteEndDocument();
91 } 89 }
92 } 90 }
93 91
94 /// <summary> 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>
95 /// Gets table by name. 104 /// Gets table by name.
96 /// </summary> 105 /// </summary>
97 public bool TryGetTable(string tableName, out Table table) => this.Tables.TryGetTable(tableName, out table); 106 public bool TryGetTable(string tableName, out Table table) => this.Tables.TryGetTable(tableName, out table);