diff options
Diffstat (limited to 'src/WixToolset.Core.TestPackage/BundleExtractor.cs')
-rw-r--r-- | src/WixToolset.Core.TestPackage/BundleExtractor.cs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/WixToolset.Core.TestPackage/BundleExtractor.cs b/src/WixToolset.Core.TestPackage/BundleExtractor.cs index 8a56f117..ad97f113 100644 --- a/src/WixToolset.Core.TestPackage/BundleExtractor.cs +++ b/src/WixToolset.Core.TestPackage/BundleExtractor.cs | |||
@@ -7,8 +7,19 @@ namespace WixToolset.Core.TestPackage | |||
7 | using WixToolset.Core.Burn.Bundles; | 7 | using WixToolset.Core.Burn.Bundles; |
8 | using WixToolset.Extensibility.Services; | 8 | using WixToolset.Extensibility.Services; |
9 | 9 | ||
10 | /// <summary> | ||
11 | /// Class to extract bundle contents for testing. | ||
12 | /// </summary> | ||
10 | public class BundleExtractor | 13 | public class BundleExtractor |
11 | { | 14 | { |
15 | /// <summary> | ||
16 | /// Extracts the BA container. | ||
17 | /// </summary> | ||
18 | /// <param name="messaging"></param> | ||
19 | /// <param name="bundleFilePath">Path to the bundle.</param> | ||
20 | /// <param name="destinationFolderPath">Path to extract to.</param> | ||
21 | /// <param name="tempFolderPath">Temp path for extraction.</param> | ||
22 | /// <returns></returns> | ||
12 | public static ExtractBAContainerResult ExtractBAContainer(IMessaging messaging, string bundleFilePath, string destinationFolderPath, string tempFolderPath) | 23 | public static ExtractBAContainerResult ExtractBAContainer(IMessaging messaging, string bundleFilePath, string destinationFolderPath, string tempFolderPath) |
13 | { | 24 | { |
14 | var result = new ExtractBAContainerResult(); | 25 | var result = new ExtractBAContainerResult(); |
@@ -33,6 +44,12 @@ namespace WixToolset.Core.TestPackage | |||
33 | return result; | 44 | return result; |
34 | } | 45 | } |
35 | 46 | ||
47 | /// <summary> | ||
48 | /// Gets an <see cref="XmlNamespaceManager"/> for BootstrapperApplicationData.xml with the given prefix assigned to the root namespace. | ||
49 | /// </summary> | ||
50 | /// <param name="document"></param> | ||
51 | /// <param name="prefix"></param> | ||
52 | /// <returns></returns> | ||
36 | public static XmlNamespaceManager GetBADataNamespaceManager(XmlDocument document, string prefix) | 53 | public static XmlNamespaceManager GetBADataNamespaceManager(XmlDocument document, string prefix) |
37 | { | 54 | { |
38 | var namespaceManager = new XmlNamespaceManager(document.NameTable); | 55 | var namespaceManager = new XmlNamespaceManager(document.NameTable); |
@@ -40,6 +57,12 @@ namespace WixToolset.Core.TestPackage | |||
40 | return namespaceManager; | 57 | return namespaceManager; |
41 | } | 58 | } |
42 | 59 | ||
60 | /// <summary> | ||
61 | /// Gets an <see cref="XmlNamespaceManager"/> for BundleExtensionData.xml with the given prefix assigned to the root namespace. | ||
62 | /// </summary> | ||
63 | /// <param name="document"></param> | ||
64 | /// <param name="prefix"></param> | ||
65 | /// <returns></returns> | ||
43 | public static XmlNamespaceManager GetBundleExtensionDataNamespaceManager(XmlDocument document, string prefix) | 66 | public static XmlNamespaceManager GetBundleExtensionDataNamespaceManager(XmlDocument document, string prefix) |
44 | { | 67 | { |
45 | var namespaceManager = new XmlNamespaceManager(document.NameTable); | 68 | var namespaceManager = new XmlNamespaceManager(document.NameTable); |
@@ -47,6 +70,12 @@ namespace WixToolset.Core.TestPackage | |||
47 | return namespaceManager; | 70 | return namespaceManager; |
48 | } | 71 | } |
49 | 72 | ||
73 | /// <summary> | ||
74 | /// Gets an <see cref="XmlNamespaceManager"/> for the Burn manifest.xml with the given prefix assigned to the root namespace. | ||
75 | /// </summary> | ||
76 | /// <param name="document"></param> | ||
77 | /// <param name="prefix"></param> | ||
78 | /// <returns></returns> | ||
50 | public static XmlNamespaceManager GetBurnNamespaceManager(XmlDocument document, string prefix) | 79 | public static XmlNamespaceManager GetBurnNamespaceManager(XmlDocument document, string prefix) |
51 | { | 80 | { |
52 | var namespaceManager = new XmlNamespaceManager(document.NameTable); | 81 | var namespaceManager = new XmlNamespaceManager(document.NameTable); |
@@ -54,6 +83,11 @@ namespace WixToolset.Core.TestPackage | |||
54 | return namespaceManager; | 83 | return namespaceManager; |
55 | } | 84 | } |
56 | 85 | ||
86 | /// <summary> | ||
87 | /// Loads an XmlDocument with the BootstrapperApplicationData.xml from the given folder that contains the contents of the BA container. | ||
88 | /// </summary> | ||
89 | /// <param name="baFolderPath"></param> | ||
90 | /// <returns></returns> | ||
57 | public static XmlDocument LoadBAData(string baFolderPath) | 91 | public static XmlDocument LoadBAData(string baFolderPath) |
58 | { | 92 | { |
59 | var document = new XmlDocument(); | 93 | var document = new XmlDocument(); |
@@ -61,6 +95,11 @@ namespace WixToolset.Core.TestPackage | |||
61 | return document; | 95 | return document; |
62 | } | 96 | } |
63 | 97 | ||
98 | /// <summary> | ||
99 | /// Loads an XmlDocument with the BootstrapperApplicationData.xml from the given folder that contains the contents of the BA container. | ||
100 | /// </summary> | ||
101 | /// <param name="baFolderPath"></param> | ||
102 | /// <returns></returns> | ||
64 | public static XmlDocument LoadBundleExtensionData(string baFolderPath) | 103 | public static XmlDocument LoadBundleExtensionData(string baFolderPath) |
65 | { | 104 | { |
66 | var document = new XmlDocument(); | 105 | var document = new XmlDocument(); |
@@ -68,6 +107,11 @@ namespace WixToolset.Core.TestPackage | |||
68 | return document; | 107 | return document; |
69 | } | 108 | } |
70 | 109 | ||
110 | /// <summary> | ||
111 | /// Loads an XmlDocument with the BootstrapperApplicationData.xml from the given folder that contains the contents of the BA container. | ||
112 | /// </summary> | ||
113 | /// <param name="baFolderPath"></param> | ||
114 | /// <returns></returns> | ||
71 | public static XmlDocument LoadBurnManifest(string baFolderPath) | 115 | public static XmlDocument LoadBurnManifest(string baFolderPath) |
72 | { | 116 | { |
73 | var document = new XmlDocument(); | 117 | var document = new XmlDocument(); |