WriteToXmlForUpdate method

void WriteToXmlForUpdate(
  1. EwsServiceXmlWriter writer
)
Writes the EWS update operations corresponding to the changes that occurred in the bag to XML. The writer to write the updates to.

Implementation

void WriteToXmlForUpdate(EwsServiceXmlWriter writer) {
  writer.WriteStartElement(
      XmlNamespace.Types, this.Owner!.GetChangeXmlElementName());

  this.Owner!.GetId()!.WriteToXmlElemenetName(writer);

  writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.Updates);

  for (PropertyDefinition propertyDefinition in this._addedProperties) {
    this._WriteSetUpdateToXml(writer, propertyDefinition);
  }

  for (PropertyDefinition propertyDefinition in this._modifiedProperties) {
    this._WriteSetUpdateToXml(writer, propertyDefinition);
  }

  for (MapEntry<PropertyDefinition, Object?> property
      in this._deletedProperties.entries) {
    this.WriteDeleteUpdateToXml(writer, property.key, property.value);
  }

  writer.WriteEndElement();
  writer.WriteEndElement();
}