LoadFromXml method

Future<void> LoadFromXml(
  1. EwsXmlReader reader
)
Load from XML. The reader.

Implementation

Future<void> LoadFromXml(EwsXmlReader reader) async {
  do {
    await reader.Read();

    if (reader.NodeType == XmlNodeType.Element) {
      switch (reader.LocalName) {
        case XmlElementNames.DisplayName:
          this._displayName = await reader.ReadElementValue<String>();
          break;
        case XmlElementNames.LegacyDN:
          this._legacyDN = await reader.ReadElementValue<String>();
          break;
        case XmlElementNames.DeploymentId:
          this._deploymentId = await reader.ReadElementValue<String>();
          break;
        case XmlElementNames.AutoDiscoverSMTPAddress:
          this._autodiscoverAMTPAddress =
              await reader.ReadElementValue<String>();
          break;
        default:
          await reader.SkipCurrentElement();
          break;
      }
    }
  } while (!reader.IsEndElementWithNamespace(
      XmlNamespace.NotSpecified, XmlElementNames.User));
}