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.IsUndecidedApprovalRequest:
      this.isUndecidedApprovalRequest = await reader.ReadElementValue<bool>();
      return true;
    case XmlElementNames.ApprovalDecision:
      this.approvalDecision = await reader.ReadElementValue<int>();
      return true;
    case XmlElementNames.ApprovalDecisionMaker:
      this.approvalDecisionMaker = await reader.ReadElementValue<String>();
      return true;
    case XmlElementNames.ApprovalDecisionTime:
      this.approvalDecisionTime = await reader.ReadElementValueAsDateTime();
      return true;
    default:
      return false;
  }
}