WriteAttributesToXml method

  1. @override
void WriteAttributesToXml(
  1. EwsServiceXmlWriter writer
)
override
Writes the attributes to XML. The writer.

Implementation

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

  if (writer.Service.RequestedServerVersion.index >
      ExchangeVersion.Exchange2007_SP1.index) {
    writer.WriteAttributeValue(
        XmlAttributeNames.Name, this.EmailAddress!.Name);
    writer.WriteAttributeValue(
        XmlAttributeNames.RoutingType, this.EmailAddress!.RoutingType);
    if (this.EmailAddress!.MailboxType != MailboxType.Unknown) {
      writer.WriteAttributeValue(
          XmlAttributeNames.MailboxType, this.EmailAddress!.MailboxType);
    }
  }
}