WritePropertyValueToXml method

  1. @override
void WritePropertyValueToXml(
  1. EwsServiceXmlWriter writer,
  2. PropertyBag propertyBag,
  3. bool isUpdateOperation
)
override
Writes to XML. The writer. The property bag. Indicates whether the context is an update operation.

Implementation

@override
void WritePropertyValueToXml(EwsServiceXmlWriter writer,
    PropertyBag propertyBag, bool isUpdateOperation) {
  ComplexProperty? complexProperty = propertyBag[this] as ComplexProperty?;

  if (complexProperty != null) {
    writer.WriteStartElement(XmlNamespace.Types, this.XmlElementName);

    complexProperty.WriteToXml(writer, this.containedXmlElementName);

    writer.WriteEndElement(); // this.XmlElementName
  }
}