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;
    _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)) {
          _attributionList.add(s);
        }
      }
    } while (!reader.IsEndElementWithNamespace(
      XmlNamespace.Types,
      localName,
    ));
    Attributions = _attributionList.toList();
  }

  return true;
}