WriteElementsToXml method

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

Implementation

@override
void WriteElementsToXml(EwsServiceXmlWriter writer) {
  writer.WriteStartElement(
      XmlNamespace.Messages, XmlElementNames.AttachmentIds);

  for (Attachment? attachment in this.Attachments) {
    writer.WriteStartElement(
        XmlNamespace.Types, XmlElementNames.AttachmentId);
    writer.WriteAttributeValue(XmlAttributeNames.Id, attachment!.Id);
    writer.WriteEndElement();
  }

  writer.WriteEndElement();
}