InternalLoadFromXml method

Future<void> InternalLoadFromXml(
  1. EwsServiceXmlReader reader,
  2. PropertyBag propertyBag
)
Internals the load from XML. The reader. The property bag.

Implementation

Future<void> InternalLoadFromXml(
    EwsServiceXmlReader reader, PropertyBag propertyBag) async {
  OutParam<Object> complexPropertyOutParam = new OutParam<Object>();

  bool justCreated =
      _GetPropertyInstance(propertyBag, complexPropertyOutParam);

  if (!justCreated &&
      this.HasFlag(PropertyDefinitionFlags.UpdateCollectionItems,
          propertyBag.Owner!.Service.RequestedServerVersion)) {
    await (complexPropertyOutParam.param as ComplexProperty)
        .UpdateFromXml(reader, reader.LocalName);
  } else {
    await (complexPropertyOutParam.param as ComplexProperty)
        .LoadFromXml(reader, reader.LocalName);
  }

  propertyBag[this] = complexPropertyOutParam.param;
}