WriteElementsToXml method

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

Implementation

@override
void WriteElementsToXml(EwsServiceXmlWriter writer) {
  if (this.ParentFolderId != null) {
    writer.WriteStartElement(
        XmlNamespace.Messages, this.GetParentFolderXmlElementName());
    this.ParentFolderId!.WriteToXmlElemenetName(writer);
    writer.WriteEndElement();
  }

  writer.WriteStartElement(
      XmlNamespace.Messages, this.GetObjectCollectionXmlElementName());
  for (ServiceObject obj in this._objects!) {
    obj.WriteToXml(writer);
  }
  writer.WriteEndElement();
}