LoadFromXml method

void LoadFromXml(
  1. EwsServiceXmlReader reader
)
Loads from XML. The reader.

Implementation

void LoadFromXml(EwsServiceXmlReader reader) {
  reader.ReadStartElementWithNamespace(
      XmlNamespace.Types, XmlElementNames.Resolution);

  reader.ReadStartElementWithNamespace(
      XmlNamespace.Types, XmlElementNames.Mailbox);
  this._mailbox.LoadFromXml(reader, XmlElementNames.Mailbox);

  reader.Read();
  if (reader.IsStartElementWithNamespace(
      XmlNamespace.Types, XmlElementNames.Contact)) {
    this._contact = new items.Contact(this._owner.Session!);

    // Contacts returned by ResolveNames should behave like Contact.Load with FirstClassPropertySet specified.
    this._contact!.LoadFromXmlWithPropertySet(
        reader,
        true,
        /* clearPropertyBag */
        PropertySet.FirstClassProperties,
        false); /* summaryPropertiesOnly */

    reader.ReadEndElementWithNamespace(
        XmlNamespace.Types, XmlElementNames.Resolution);
  } else {
    reader.EnsureCurrentNodeIsEndElement(
        XmlNamespace.Types, XmlElementNames.Resolution);
  }
}