aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Mba.Core/BootstrapperApplicationData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Mba.Core/BootstrapperApplicationData.cs')
-rw-r--r--src/WixToolset.Mba.Core/BootstrapperApplicationData.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/WixToolset.Mba.Core/BootstrapperApplicationData.cs b/src/WixToolset.Mba.Core/BootstrapperApplicationData.cs
index 05672f1b..739a08bb 100644
--- a/src/WixToolset.Mba.Core/BootstrapperApplicationData.cs
+++ b/src/WixToolset.Mba.Core/BootstrapperApplicationData.cs
@@ -6,12 +6,29 @@ namespace WixToolset.Mba.Core
6 using System.IO; 6 using System.IO;
7 using System.Xml.XPath; 7 using System.Xml.XPath;
8 8
9 /// <summary>
10 /// Utility class for reading BootstrapperApplicationData.xml.
11 /// </summary>
9 public class BootstrapperApplicationData : IBootstrapperApplicationData 12 public class BootstrapperApplicationData : IBootstrapperApplicationData
10 { 13 {
14 /// <summary>
15 ///
16 /// </summary>
11 public const string DefaultFileName = "BootstrapperApplicationData.xml"; 17 public const string DefaultFileName = "BootstrapperApplicationData.xml";
18
19 /// <summary>
20 ///
21 /// </summary>
12 public const string XMLNamespace = "http://wixtoolset.org/schemas/v4/BootstrapperApplicationData"; 22 public const string XMLNamespace = "http://wixtoolset.org/schemas/v4/BootstrapperApplicationData";
13 23
24 /// <summary>
25 /// The default path of where the BA was extracted to.
26 /// </summary>
14 public static readonly DirectoryInfo DefaultFolder; 27 public static readonly DirectoryInfo DefaultFolder;
28
29 /// <summary>
30 /// The default path to BootstrapperApplicationData.xml.
31 /// </summary>
15 public static readonly FileInfo DefaultFile; 32 public static readonly FileInfo DefaultFile;
16 33
17 static BootstrapperApplicationData() 34 static BootstrapperApplicationData()
@@ -20,12 +37,21 @@ namespace WixToolset.Mba.Core
20 DefaultFile = new FileInfo(Path.Combine(DefaultFolder.FullName, DefaultFileName)); 37 DefaultFile = new FileInfo(Path.Combine(DefaultFolder.FullName, DefaultFileName));
21 } 38 }
22 39
40 /// <inheritdoc/>
23 public FileInfo BADataFile { get; private set; } 41 public FileInfo BADataFile { get; private set; }
24 42
43 /// <inheritdoc/>
25 public IBundleInfo Bundle { get; private set; } 44 public IBundleInfo Bundle { get; private set; }
26 45
46 /// <summary>
47 /// Uses the default location for BootstrapperApplicationData.xml.
48 /// </summary>
27 public BootstrapperApplicationData() : this(DefaultFile) { } 49 public BootstrapperApplicationData() : this(DefaultFile) { }
28 50
51 /// <summary>
52 /// Uses the given file for BootstrapperApplicationData.xml.
53 /// </summary>
54 /// <param name="baDataFile"></param>
29 public BootstrapperApplicationData(FileInfo baDataFile) 55 public BootstrapperApplicationData(FileInfo baDataFile)
30 { 56 {
31 this.BADataFile = baDataFile; 57 this.BADataFile = baDataFile;
@@ -36,6 +62,12 @@ namespace WixToolset.Mba.Core
36 } 62 }
37 } 63 }
38 64
65 /// <summary>
66 /// Utility method for parsing BootstrapperApplicationData.xml.
67 /// </summary>
68 /// <param name="node"></param>
69 /// <param name="attributeName"></param>
70 /// <returns></returns>
39 public static string GetAttribute(XPathNavigator node, string attributeName) 71 public static string GetAttribute(XPathNavigator node, string attributeName)
40 { 72 {
41 XPathNavigator attribute = node.SelectSingleNode("@" + attributeName); 73 XPathNavigator attribute = node.SelectSingleNode("@" + attributeName);
@@ -48,6 +80,12 @@ namespace WixToolset.Mba.Core
48 return attribute.Value; 80 return attribute.Value;
49 } 81 }
50 82
83 /// <summary>
84 /// Utility method for parsing BootstrapperApplicationData.xml.
85 /// </summary>
86 /// <param name="node"></param>
87 /// <param name="attributeName"></param>
88 /// <returns></returns>
51 public static bool? GetYesNoAttribute(XPathNavigator node, string attributeName) 89 public static bool? GetYesNoAttribute(XPathNavigator node, string attributeName)
52 { 90 {
53 string attributeValue = GetAttribute(node, attributeName); 91 string attributeValue = GetAttribute(node, attributeName);