LoadFromXml method

Future<void> LoadFromXml(
  1. EwsServiceXmlReader reader
)
Loads from XML. The reader.

Implementation

Future<void> LoadFromXml(EwsServiceXmlReader reader) async {
  await reader.ReadStartElementWithNamespace(
      XmlNamespace.Messages, XmlElementNames.ResolutionSet);

  int totalItemsInView =
      reader.ReadAttributeValue<int>(XmlAttributeNames.TotalItemsInView)!;
  this._includesAllResolutions = reader.ReadAttributeValue<bool>(
      XmlAttributeNames.IncludesLastItemInRange);

  for (int i = 0; i < totalItemsInView; i++) {
    NameResolution nameResolution = new NameResolution(this);

    await nameResolution.LoadFromXml(reader);

    this._items.add(nameResolution);
  }

  await reader.ReadEndElementWithNamespace(
      XmlNamespace.Messages, XmlElementNames.ResolutionSet);
}