WriteElementsToXml method

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

Implementation

@override
void WriteElementsToXml(EwsServiceXmlWriter writer) {
  writer.WriteElementValueWithNamespace(
      XmlNamespace.Types, XmlElementNames.FlagStatus, this.FlagStatus);

  if (this.FlagStatus == ItemFlagStatus.Flagged) {
    writer.WriteElementValueWithNamespace(
        XmlNamespace.Types, XmlElementNames.StartDate, this.StartDate);
    writer.WriteElementValueWithNamespace(
        XmlNamespace.Types, XmlElementNames.DueDate, this.DueDate);
  } else if (this.FlagStatus == ItemFlagStatus.Complete) {
    writer.WriteElementValueWithNamespace(
        XmlNamespace.Types, XmlElementNames.CompleteDate, this.CompleteDate);
  }
}