UpdateFromXmlWithNamespace method
Future<void>
UpdateFromXmlWithNamespace(
- EwsServiceXmlReader reader,
- XmlNamespace xmlNamespace,
- String xmlElementName
override
Implementation
@override
Future<void> UpdateFromXmlWithNamespace(EwsServiceXmlReader reader,
XmlNamespace xmlNamespace, String xmlElementName) async {
reader.EnsureCurrentNodeIsStartElementWithNamespace(
xmlNamespace, xmlElementName);
if (!reader.IsEmptyElement) {
int index = 0;
do {
await reader.Read();
if (reader.IsStartElement()) {
TComplexProperty? complexProperty =
this.CreateComplexProperty(reader.LocalName);
TComplexProperty actualComplexProperty = this[index++];
// todo("implement check")
// if (complexProperty == null || !complexProperty.GetType().IsInstanceOfType(actualComplexProperty))
// {
// throw new ServiceLocalException("Strings.PropertyTypeIncompatibleWhenUpdatingCollection");
// }
await actualComplexProperty.UpdateFromXmlWithNamespace(
reader, xmlNamespace, reader.LocalName);
}
} while (!reader.IsEndElementWithNamespace(xmlNamespace, xmlElementName));
}
}