WriteSetUpdateToXml method
bool
WriteSetUpdateToXml(
- EwsServiceXmlWriter writer,
- ServiceObject? ewsObject,
- PropertyDefinition propertyDefinition
override
Implementation
bool WriteSetUpdateToXml(EwsServiceXmlWriter writer, ServiceObject? ewsObject,
PropertyDefinition propertyDefinition) {
List<ExtendedProperty> propertiesToSet = <ExtendedProperty>[];
propertiesToSet.addAll(this.AddedItems);
propertiesToSet.addAll(this.ModifiedItems);
for (ExtendedProperty extendedProperty in propertiesToSet) {
writer.WriteStartElement(
XmlNamespace.Types, ewsObject!.GetSetFieldXmlElementName());
extendedProperty.PropertyDefinition!.WriteToXml(writer);
writer.WriteStartElement(
XmlNamespace.Types, ewsObject.GetXmlElementName());
extendedProperty.WriteToXml(writer, XmlElementNames.ExtendedProperty);
writer.WriteEndElement();
writer.WriteEndElement();
}
for (ExtendedProperty? extendedProperty in this.RemovedItems) {
writer.WriteStartElement(
XmlNamespace.Types, ewsObject!.GetDeleteFieldXmlElementName());
extendedProperty!.PropertyDefinition!.WriteToXml(writer);
writer.WriteEndElement();
}
return true;
}