From 750994db47eaa10f7e6ec32de22c9ccdba0c1856 Mon Sep 17 00:00:00 2001 From: Jack Kanarish Date: Mon, 19 Mar 2018 11:17:12 -0400 Subject: [PATCH] Add missing TryReadChildElementContent for Uint type --- ICD.Common.Utils/Xml/XmlUtils.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ICD.Common.Utils/Xml/XmlUtils.cs b/ICD.Common.Utils/Xml/XmlUtils.cs index 1d5b287..1dd300a 100644 --- a/ICD.Common.Utils/Xml/XmlUtils.cs +++ b/ICD.Common.Utils/Xml/XmlUtils.cs @@ -472,6 +472,25 @@ namespace ICD.Common.Utils.Xml } } + /// + /// Gets the content of the immediate child. Returns null if the child element was not found. + /// + /// + /// + /// + [PublicAPI] + public static uint? TryReadChildElementContentAsUInt(string xml, string childElement) + { + try + { + return ReadChildElementContentAsUint(xml, childElement); + } + catch (FormatException) + { + return null; + } + } + /// /// Gets the content of the immediate child. Returns null if the child element was not found. ///