LoadWebClientUrlsFromXml static method

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 void LoadWebClientUrlsFromXml(EwsXmlReader reader,
    WebClientUrlCollection? webClientUrls, String elementName) {
  do {
    reader.Read();

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