CreateComplexProperty method
Instantiate the appropriate attachment type depending on the current XML element name.
The XML element name from which to determine the type of attachment to create.
Implementation
@override
Attachment? CreateComplexProperty(String xmlElementName) {
switch (xmlElementName) {
case XmlElementNames.FileAttachment:
return FileAttachment.withOwner(_owner!);
case XmlElementNames.ItemAttachment:
return ItemAttachment.withOwner(_owner!);
case XmlElementNames.ReferenceAttachment:
return ReferenceAttachment.withOwner(_owner!);
default:
return null;
}
}