TryReadCurrentXmlElement method

  1. @override
bool TryReadCurrentXmlElement(
  1. EwsXmlReader reader
)
override
Tries to read the current XML element. The reader.

Implementation

@override
bool TryReadCurrentXmlElement(EwsXmlReader reader) {
  if (!super.TryReadCurrentXmlElement(reader)) {
    switch (reader.LocalName) {
      case XmlElementNames.User:
        this._user.LoadFromXml(reader);
        return true;
      case XmlElementNames.Account:
        this._account!.LoadFromXml(reader);
        return true;
      default:
        reader.SkipCurrentElement();
        return false;
    }
  } else {
    return true;
  }
}