ReadElementsFromXml method

  1. @override
Future<void> ReadElementsFromXml(
  1. EwsServiceXmlReader reader
)
override
Reads response elements from XML. The reader.

Implementation

@override
Future<void> ReadElementsFromXml(EwsServiceXmlReader reader) async {
  await super.ReadElementsFromXml(reader);

  await reader.ReadStartElementWithNamespace(
      XmlNamespace.Messages, XmlElementNames.RootItemId);

  String? changeKey =
      reader.ReadAttributeValue(XmlAttributeNames.RootItemChangeKey);
  if (!StringUtils.IsNullOrEmpty(changeKey) &&
      this._attachment!.Owner != null) {
    this._attachment!.Owner!.RootItemId!.ChangeKey = changeKey;
  }

  await reader.ReadEndElementIfNecessary(
      XmlNamespace.Messages, XmlElementNames.RootItemId);
}