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 {
  bool result = await super.TryReadElementFromXml(reader);

  if (!result) {
    if (reader.LocalName == XmlElementNames.Bitmask) {
      // EWS always returns the Bitmask value in hexadecimal
      this.bitmask = int.parse(
          reader.ReadAttributeValue(XmlAttributeNames.Value),
          radix: 16);
    }
  }

  return result;
}