LoadAttributionsFromXml method

Future<bool> LoadAttributionsFromXml(
  1. EwsServiceXmlReader reader
)
Read attribution blobs from XML XML reader

Implementation

Future<bool> LoadAttributionsFromXml(EwsServiceXmlReader reader) async {
  if (!reader.IsEmptyElement) {
    String localName = reader.LocalName;
    this._attributionList = <String?>[];

    do {
      await reader.Read();
      if (reader.NodeType == XmlNodeType.Element &&
          reader.LocalName == XmlElementNames.Attribution) {
        String? s = await reader.ReadElementValue<String>();
        if (!StringUtils.IsNullOrEmpty(s)) {
          this._attributionList.add(s);
        }
      }
    } while (
        !reader.IsEndElementWithNamespace(XmlNamespace.Types, localName));
    this.Attributions = this._attributionList.toList();
  }

  return true;
}