LoadFromXml method

  1. @override
Future<void> LoadFromXml(
  1. EwsXmlReader reader,
  2. String endElementName
)
override
Loads response from XML. The reader. End element name.

Implementation

@override
Future<void> LoadFromXml(EwsXmlReader reader, String endElementName) async {
  do {
    await reader.Read();

    if (reader.NodeType == XmlNodeType.Element) {
      switch (reader.LocalName) {
        case XmlElementNames.RedirectTarget:
          this._redirectTarget = await reader.ReadElementValue<String>();
          break;
        case XmlElementNames.DomainSettingErrors:
          await this.LoadDomainSettingErrorsFromXml(reader);
          break;
        case XmlElementNames.DomainSettings:
          await this.LoadDomainSettingsFromXml(reader);
          break;
        default:
          await super.LoadFromXml(reader, endElementName);
          break;
      }
    }
  } while (!reader.IsEndElementWithNamespace(
      XmlNamespace.Autodiscover, endElementName));
}