TryLoadFromXml static method
Future<bool>
TryLoadFromXml(
- EwsServiceXmlReader reader,
- OutParam<
PropertyDefinitionBase> propertyDefinitionOutParam
Implementation
static Future<bool> TryLoadFromXml(
EwsServiceXmlReader reader,
OutParam<PropertyDefinitionBase> propertyDefinitionOutParam,
) async {
switch (reader.LocalName) {
case XmlElementNames.FieldURI:
propertyDefinitionOutParam.param =
ServiceObjectSchema.FindPropertyDefinition(
reader.ReadAttributeValue(XmlAttributeNames.FieldURI),
);
await reader.SkipCurrentElement();
return true;
case XmlElementNames.IndexedFieldURI:
propertyDefinitionOutParam.param = IndexedPropertyDefinition(
reader.ReadAttributeValue(XmlAttributeNames.FieldURI),
reader.ReadAttributeValue(XmlAttributeNames.FieldIndex),
);
await reader.SkipCurrentElement();
return true;
case XmlElementNames.ExtendedFieldURI:
propertyDefinitionOutParam.param = ExtendedPropertyDefinition();
await (propertyDefinitionOutParam.param as ExtendedPropertyDefinition)
.LoadFromXml(reader);
return true;
default:
return false;
}
}