LoadResponseCollectionFromXml method

Future<void> LoadResponseCollectionFromXml(
  1. EwsXmlReader reader
)
Loads the response collection from XML. The reader.

Implementation

/* private */
Future<void> LoadResponseCollectionFromXml(EwsXmlReader reader) async {
  if (!reader.IsEmptyElement) {
    do {
      await reader.Read();
      if ((reader.NodeType == XmlNodeType.Element) &&
          (reader.LocalName == this.GetResponseInstanceXmlElementName())) {
        TResponse response = this.CreateResponseInstance();
        await response.LoadFromXml(
            reader, this.GetResponseInstanceXmlElementName());
        this.Responses!.add(response);
      }
    } while (!reader.IsEndElementWithNamespace(XmlNamespace.Autodiscover,
        this.GetResponseCollectionXmlElementName()));
  }
}