ReadAttributesFromXml method

  1. @override
void ReadAttributesFromXml(
  1. EwsServiceXmlReader reader
)
override
Reads the attributes from XML. The reader.

Implementation

@override
void ReadAttributesFromXml(EwsServiceXmlReader reader) {
  this._name = reader.ReadAttributeValue(XmlAttributeNames.Name);
  this._id = reader.ReadAttributeValue(XmlAttributeNames.Id);

  // EWS can return a TimeZone definition with no Id. Generate a new Id in this case.
  if (StringUtils.IsNullOrEmpty(this._id)) {
    String? nameValue = StringUtils.IsNullOrEmpty(this.Name) ? "" : this.Name;
    this.Id = _NoIdPrefix + Abs(nameValue.hashCode).toString();
  }
}