LoadFromXml static method

Loads instance of AlternateMailboxCollection from XML. The reader.

Implementation

static Future<AlternateMailboxCollection> LoadFromXml(
    EwsXmlReader reader) async {
  AlternateMailboxCollection instance = new AlternateMailboxCollection();

  do {
    await reader.Read();

    if ((reader.NodeType == XmlNodeType.Element) &&
        (reader.LocalName == XmlElementNames.AlternateMailbox)) {
      instance.Entries.add(await AlternateMailbox.LoadFromXml(reader));
    }
  } while (!reader.IsEndElementWithNamespace(
      XmlNamespace.Autodiscover, XmlElementNames.AlternateMailboxes));

  return instance;
}