// Copied and modified from https://referencesource.microsoft.com/#System.Xml/System/Xml/Core/XmlReader.cs
 public static async Task <DateTimeOffset> ReadElementContentAsDateTimeOffsetAsync(this XmlReader reader, string localName, string namespaceURI)
 {
     reader.CheckElement(localName, namespaceURI);
     return(XmlConvert.ToDateTimeOffset(await reader.ReadElementContentAsStringAsync().ConfigureAwait(false)));
 }
 // Copied and modified from https://referencesource.microsoft.com/#System.Xml/System/Xml/Core/XmlReader.cs
 public static async Task <Boolean> ReadElementContentAsBooleanAsync(this XmlReader reader, string localName, string namespaceURI)
 {
     reader.CheckElement(localName, namespaceURI);
     return(XmlConvert.ToBoolean(await reader.ReadElementContentAsStringAsync().ConfigureAwait(false)));
 }
 public static async Task <string> ReadElementContentAsStringAsync(this XmlReader reader, string localName, string namespaceURI)
 {
     reader.CheckElement(localName, namespaceURI);
     return(await reader.ReadElementContentAsStringAsync().ConfigureAwait(continueOnCapturedContext: false));
 }