TryReadElementFromXml method
Initializes a new instance of the
The location DisplayName.
Initializes a new instance of the
The location DisplayName.
The annotation on the location.
Initializes a new instance of the
The location DisplayName.
The annotation on the location.
The persona postal address.
Tries to read element from XML.
The reader.
Implementation
// EnhancedLocation(String displayName)
// : this(displayName, String.Empty, new complex.PersonaPostalAddress())
// {
// }
/// <summary>
/// Initializes a new instance of the <see cref="EnhancedLocation"/> class.
/// </summary>
/// <param name="displayName">The location DisplayName.</param>
/// <param name="annotation">The annotation on the location.</param>
// EnhancedLocation(String displayName, String annotation)
// : this(displayName, annotation, new complex.PersonaPostalAddress())
// {
// }
/// <summary>
/// Initializes a new instance of the <see cref="EnhancedLocation"/> class.
/// </summary>
/// <param name="displayName">The location DisplayName.</param>
/// <param name="annotation">The annotation on the location.</param>
/// <param name="personaPostalAddress">The persona postal address.</param>
// EnhancedLocation(String displayName, String annotation, complex.PersonaPostalAddress personaPostalAddress)
// : this()
// {
// this.displayName = displayName;
// this.annotation = annotation;
// this.personaPostalAddress = personaPostalAddress;
// this.personaPostalAddress.OnChange += new ComplexPropertyChangedDelegate(PersonaPostalAddress_OnChange);
// }
/// <summary>
/// Tries to read element from XML.
/// </summary>
/// <param name="reader">The reader.</param>
/// <returns>True if element was read.</returns>
@override
Future<bool> TryReadElementFromXml(EwsServiceXmlReader reader) async {
switch (reader.LocalName) {
case XmlElementNames.LocationDisplayName:
this._displayName = await reader.ReadValue<String>();
return true;
case XmlElementNames.LocationAnnotation:
this._annotation = await reader.ReadValue<String>();
return true;
case XmlElementNames.PersonaPostalAddress:
this._personaPostalAddress = new complex.PersonaPostalAddress();
await this._personaPostalAddress!.LoadFromXmlElementName(reader);
this
._personaPostalAddress!
.addOnChangeEvent(_PersonaPostalAddress_OnChange);
return true;
default:
return false;
}
}