TryReadElementFromXml method
Defines an implicit conversion from a regular String to an attributedString.
String value of the attributed String being created
Tries to read an attributed String blob represented in XML.
XML reader
Implementation
// static implicit operator AttributedString(String value)
// {
// return new AttributedString(value);
// }
/// <summary>
/// Tries to read an attributed String blob represented in XML.
/// </summary>
/// <param name="reader">XML reader</param>
/// <returns>Whether reading succeeded</returns>
@override
Future<bool> TryReadElementFromXml(EwsServiceXmlReader reader) async {
switch (reader.LocalName) {
case XmlElementNames.Value:
this.Value = await reader.ReadElementValue<String>();
return true;
case XmlElementNames.Attributions:
return await this.LoadAttributionsFromXml(reader);
default:
return false;
}
}