LoadPropertyValueFromXml method

  1. @override
Future<void> LoadPropertyValueFromXml(
  1. EwsServiceXmlReader reader,
  2. PropertyBag propertyBag
)
override
Loads from XML. The reader. The property bag.

Implementation

@override
Future<void> LoadPropertyValueFromXml(
  EwsServiceXmlReader reader,
  PropertyBag propertyBag,
) async {
  reader.EnsureCurrentNodeIsStartElementWithNamespace(
    XmlNamespace.Types,
    XmlElementNames.Recurrence,
  );

  Recurrence? recurrence;

  await reader.Read(
    nodeType: XmlNodeType.Element,
  ); // This is the pattern element

  recurrence = GetRecurrenceFromString(reader.LocalName);

  await recurrence.LoadFromXml(reader, reader.LocalName);

  await reader.Read(
    nodeType: XmlNodeType.Element,
  ); // This is the range element

  RecurrenceRange range = GetRecurrenceRange(reader.LocalName);

  await range.LoadFromXml(reader, reader.LocalName);
  range.SetupRecurrence(recurrence);

  await reader.ReadEndElementIfNecessary(
    XmlNamespace.Types,
    XmlElementNames.Recurrence,
  );

  propertyBag[this] = recurrence;
}