LoadFromXml method

Future<void> LoadFromXml(
  1. EwsServiceXmlReader reader
)
Loads from XML. The reader.

Implementation

Future<void> LoadFromXml(EwsServiceXmlReader reader) async {
  String? attributeValue;

  attributeValue =
      reader.ReadAttributeValue(XmlAttributeNames.DistinguishedPropertySetId);
  if (!StringUtils.IsNullOrEmpty(attributeValue)) {
    this._propertySet = EnumToString.fromString(
        DefaultExtendedPropertySet.values, attributeValue);
  }

  attributeValue = reader.ReadAttributeValue(XmlAttributeNames.PropertySetId);
  if (!StringUtils.IsNullOrEmpty(attributeValue)) {
    this._propertySetId = Uuid(attributeValue);
  }

  attributeValue = reader.ReadAttributeValue(XmlAttributeNames.PropertyTag);
  if (!StringUtils.IsNullOrEmpty(attributeValue)) {
    this._tag = int.parse(attributeValue!);
  }

  this._name = reader.ReadAttributeValue(XmlAttributeNames.PropertyName);

  attributeValue = reader.ReadAttributeValue(XmlAttributeNames.PropertyId);
  if (!StringUtils.IsNullOrEmpty(attributeValue)) {
    this._id = int.parse(attributeValue!);
  }

  this._mapiType = reader.ReadAttributeValue<MapiPropertyType>(
      XmlAttributeNames.PropertyType);
}