ReadAttributesFromXml method

  1. @override
void ReadAttributesFromXml(
  1. EwsServiceXmlReader reader
)
override
Defines an implicit conversion of UniqueBody into a string. The UniqueBody to convert to a string. Reads attributes from XML. The reader.

Implementation

// static implicit operator string(UniqueBody messageBody)
//        {
//            EwsUtilities.ValidateParam(messageBody, "messageBody");
//            return messageBody.Text;
//        }

/// <summary>
/// Reads attributes from XML.
/// </summary>
/// <param name="reader">The reader.</param>
@override
void ReadAttributesFromXml(EwsServiceXmlReader reader) {
  this.bodyType = reader.ReadAttributeValue<enumerations.BodyType>(
      XmlAttributeNames.BodyType);

  String? attributeValue =
      reader.ReadAttributeValue(XmlAttributeNames.IsTruncated);
  if (!StringUtils.IsNullOrEmpty(attributeValue)) {
    this.isTruncated = attributeValue?.toLowerCase() == 'true';
  }
}