InternalReadElementWithNamespace method

void InternalReadElementWithNamespace(
  1. XmlNamespace xmlNamespace,
  2. String? localName,
  3. XmlNodeType nodeType
)
Read XML element. The XML namespace. Name of the local. Type of the node.

Implementation

/* private */
void InternalReadElementWithNamespace(
    XmlNamespace xmlNamespace, String? localName, XmlNodeType nodeType) {
  if (xmlNamespace == XmlNamespace.NotSpecified) {
    this._InternalReadElement("", localName, nodeType);
  } else {
    this.Read(nodeType: nodeType);

    if ((this.LocalName != localName) ||
        (this.NamespaceUri != EwsUtilities.GetNamespaceUri(xmlNamespace))) {
      throw new ServiceXmlDeserializationException("""string.Format(
                          Strings.UnexpectedElement,
                          ${EwsUtilities.GetNamespacePrefix(xmlNamespace)},
                          $localName,
                          $nodeType,
                          ${this._xmlReader.Name},
                          ${this.NodeType})""");
    }
  }
}