diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-12-18 22:04:48 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-12-18 23:58:30 -0600 |
| commit | 0e71bdd637a6b3c34f18d4b3630d55fa4cdfd2a3 (patch) | |
| tree | 697466ea42c21f6d996cf324eb191f2182300697 /src/WixToolset.Core.TestPackage/XmlNodeExtensions.cs | |
| parent | 4e9b8c43ec5870d6aee75a95acd8a0de4ff4c1db (diff) | |
| download | wix-0e71bdd637a6b3c34f18d4b3630d55fa4cdfd2a3.tar.gz wix-0e71bdd637a6b3c34f18d4b3630d55fa4cdfd2a3.tar.bz2 wix-0e71bdd637a6b3c34f18d4b3630d55fa4cdfd2a3.zip | |
Enable XML doc.
Diffstat (limited to 'src/WixToolset.Core.TestPackage/XmlNodeExtensions.cs')
| -rw-r--r-- | src/WixToolset.Core.TestPackage/XmlNodeExtensions.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/WixToolset.Core.TestPackage/XmlNodeExtensions.cs b/src/WixToolset.Core.TestPackage/XmlNodeExtensions.cs index a7f04508..f4966f74 100644 --- a/src/WixToolset.Core.TestPackage/XmlNodeExtensions.cs +++ b/src/WixToolset.Core.TestPackage/XmlNodeExtensions.cs | |||
| @@ -7,13 +7,28 @@ namespace WixToolset.Core.TestPackage | |||
| 7 | using System.Text.RegularExpressions; | 7 | using System.Text.RegularExpressions; |
| 8 | using System.Xml; | 8 | using System.Xml; |
| 9 | 9 | ||
| 10 | /// <summary> | ||
| 11 | /// Utility class to help compare XML in tests using string comparisons by using single quotes and stripping all namespaces. | ||
| 12 | /// </summary> | ||
| 10 | public static class XmlNodeExtensions | 13 | public static class XmlNodeExtensions |
| 11 | { | 14 | { |
| 15 | /// <summary> | ||
| 16 | /// Returns the node's outer XML using single quotes and stripping all namespaces. | ||
| 17 | /// </summary> | ||
| 18 | /// <param name="node"></param> | ||
| 19 | /// <param name="ignoredAttributesByElementName">Attributes for which the value should be set to '*'.</param> | ||
| 20 | /// <returns></returns> | ||
| 12 | public static string GetTestXml(this XmlNode node, Dictionary<string, List<string>> ignoredAttributesByElementName = null) | 21 | public static string GetTestXml(this XmlNode node, Dictionary<string, List<string>> ignoredAttributesByElementName = null) |
| 13 | { | 22 | { |
| 14 | return node.OuterXml.GetTestXml(ignoredAttributesByElementName); | 23 | return node.OuterXml.GetTestXml(ignoredAttributesByElementName); |
| 15 | } | 24 | } |
| 16 | 25 | ||
| 26 | /// <summary> | ||
| 27 | /// Returns the XML using single quotes and stripping all namespaces. | ||
| 28 | /// </summary> | ||
| 29 | /// <param name="xml"></param> | ||
| 30 | /// <param name="ignoredAttributesByElementName">Attributes for which the value should be set to '*'.</param> | ||
| 31 | /// <returns></returns> | ||
| 17 | public static string GetTestXml(this string xml, Dictionary<string, List<string>> ignoredAttributesByElementName = null) | 32 | public static string GetTestXml(this string xml, Dictionary<string, List<string>> ignoredAttributesByElementName = null) |
| 18 | { | 33 | { |
| 19 | string formattedXml; | 34 | string formattedXml; |
