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 {
  switch (reader.LocalName) {
    case XmlElementNames.ItemId:
      this._itemId = new complex.ItemId();
      await this._itemId!.LoadFromXml(reader, reader.LocalName);
      return true;
    case XmlElementNames.Start:
      this._start = await reader.ReadElementValueAsDateTime();
      return true;
    case XmlElementNames.End:
      this._end = await reader.ReadElementValueAsDateTime();
      return true;
    case XmlElementNames.OriginalStart:
      this._originalStart = await reader.ReadElementValueAsDateTime();
      return true;
    default:
      return false;
  }
}