LoadFromXml static method

Loads instance of DocumentSharingLocationCollection from XML. The reader.

Implementation

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

  do {
    await reader.Read();

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

  return instance;
}