mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 03:57:32 +00:00
Add missing TryReadChildElementContent for Uint type
This commit is contained in:
parent
c2fa4263cc
commit
750994db47
1 changed files with 19 additions and 0 deletions
|
|
@ -472,6 +472,25 @@ namespace ICD.Common.Utils.Xml
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the content of the immediate child. Returns null if the child element was not found.
|
||||
/// </summary>
|
||||
/// <param name="xml"></param>
|
||||
/// <param name="childElement"></param>
|
||||
/// <returns></returns>
|
||||
[PublicAPI]
|
||||
public static uint? TryReadChildElementContentAsUInt(string xml, string childElement)
|
||||
{
|
||||
try
|
||||
{
|
||||
return ReadChildElementContentAsUint(xml, childElement);
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the content of the immediate child. Returns null if the child element was not found.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue