ReadAttributesFromXml method

  1. @override
void ReadAttributesFromXml(
  1. EwsServiceXmlReader reader
)
override
Reads the attributes from XML. The reader.

Implementation

@override
void ReadAttributesFromXml(EwsServiceXmlReader reader) {
  super.ReadAttributesFromXml(reader);

  this.containmentMode =
      reader.ReadAttributeValue<enumerations.ContainmentMode>(
          XmlAttributeNames.ContainmentMode);

  try {
    this.comparisonMode =
        reader.ReadAttributeValue<enumerations.ComparisonMode>(
            XmlAttributeNames.ContainmentComparison);
  } catch (ArgumentException) {
    // This will happen if we receive a value that is defined in the EWS schema but that is not defined
    // in the API (see the comments in ComparisonMode.cs). We map that value to IgnoreCaseAndNonSpacingCharacters.
    this.comparisonMode =
        enumerations.ComparisonMode.IgnoreCaseAndNonSpacingCharacters;
  }
}