WriteElementsToXml method

  1. @override
void WriteElementsToXml(
  1. EwsServiceXmlWriter writer
)
override
Writes the elements to XML. The writer.

Implementation

@override
void WriteElementsToXml(EwsServiceXmlWriter writer) {
  super.WriteElementsToXml(writer);

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

  if (this.Value != null) {
    writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.Constant);
    writer.WriteAttributeValue(XmlAttributeNames.Value, this.Value,
        true /* alwaysWriteEmptyString */);
    writer.WriteEndElement(); // Constant
  } else {
    this.OtherPropertyDefinition!.WriteToXml(writer);
  }

  writer.WriteEndElement(); // FieldURIOrConstant
}