WriteDeleteUpdateToXml method
void
WriteDeleteUpdateToXml(
- EwsServiceXmlWriter writer,
- PropertyDefinition propertyDefinition,
- Object? propertyValue
Implementation
/* private */
void WriteDeleteUpdateToXml(EwsServiceXmlWriter writer,
PropertyDefinition propertyDefinition, Object? propertyValue) {
// The following test should not be necessary since the property bag prevents
// properties to be deleted (set to null) if they don't have the CanDelete flag,
// but it doesn't hurt...
if (propertyDefinition.HasFlagWithoutExchangeVersion(
PropertyDefinitionFlags.CanDelete)) {
bool handled = false;
if (propertyValue is ICustomUpdateSerializer) {
handled = propertyValue.WriteDeleteUpdateToXml(writer, this.Owner);
}
if (!handled) {
writer.WriteStartElement(
XmlNamespace.Types, this.Owner!.GetDeleteFieldXmlElementName());
propertyDefinition.WriteToXml(writer);
writer.WriteEndElement();
}
}
}