LoadWebClientUrlsFromXml static method

Future<void> LoadWebClientUrlsFromXml(
  1. EwsXmlReader reader,
  2. WebClientUrlCollection? webClientUrls,
  3. String elementName
)
Loads web client urls from XML. The reader. The web client urls. Name of the element.

Implementation

/* private */
static Future<void> LoadWebClientUrlsFromXml(EwsXmlReader reader,
    WebClientUrlCollection? webClientUrls, String elementName) async {
  do {
    await reader.Read();

    if (reader.NodeType == XmlNodeType.Element) {
      switch (reader.LocalName) {
        case XmlElementNames.OWAUrl:
          String? authMethod = reader.ReadAttributeValue(
              XmlAttributeNames.AuthenticationMethod);
          String? owaUrl = await reader.ReadElementValue<String>();
          WebClientUrl webClientUrl = new WebClientUrl(authMethod, owaUrl);
          webClientUrls!.Urls!.add(webClientUrl);
          break;
        default:
          await reader.SkipCurrentElement();
          break;
      }
    }
  } while (!reader.IsEndElementWithNamespace(
      XmlNamespace.NotSpecified, elementName));
}