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.StartDate:
      DateTime? startDate = await reader.ReadElementValueAsUnspecifiedDate();
      if (startDate != null) {
        this._startDate = startDate;
        return true;
      }

      return false;

    default:
      return false;
  }
}