TryReadElementFromXml method

  1. @override
Future<bool> TryReadElementFromXml(
  1. EwsServiceXmlReader reader
)
override
Tries to read Status or Mailbox elements from XML. The reader.

Implementation

@override
Future<bool> TryReadElementFromXml(EwsServiceXmlReader reader) async {
  switch (reader.LocalName) {
    case XmlElementNames.Status:
      this.status = EwsUtilities.Parse<MemberStatus>(
          await reader.ReadElementValue<String>());
      return true;

    case XmlElementNames.Mailbox:
      this.AddressInformation = new EmailAddress();
      await this.AddressInformation!.LoadFromXml(reader, reader.LocalName);
      return true;

    default:
      return false;
  }
}