WriteElementsToXml method

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

Implementation

@override
void WriteElementsToXml(EwsServiceXmlWriter writer) {
  writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.To);

  if (this.targetPeriod != null) {
    writer.WriteAttributeValue(XmlAttributeNames.Kind, PeriodTarget);
    writer.WriteValue(this.targetPeriod!.Id, XmlElementNames.To);
  } else {
    writer.WriteAttributeValue(XmlAttributeNames.Kind, GroupTarget);
    writer.WriteValue(this.targetGroup!.Id, XmlElementNames.To);
  }

  writer.WriteEndElement(); // To
}