TryReadElementFromXml method

  1. @override
Future<bool> TryReadElementFromXml(
  1. EwsServiceXmlReader reader
)
override
Tries to read element from XML. The reader.

Implementation

@override
Future<bool> TryReadElementFromXml(EwsServiceXmlReader reader) async {
  reader.EnsureCurrentNodeIsStartElement();

  TimeZoneTransition transition =
      TimeZoneTransition.Create(this.timeZoneDefinition, reader.LocalName);

  await transition.LoadFromXmlElementName(reader);

  EwsUtilities.Assert(
      transition.TargetPeriod != null,
      "TimeZoneTransitionGroup.TryReadElementFromXml",
      "The transition's target period is null.");

  this.transitions.add(transition);

  return true;
}