private void attachMementoSource(PluginFamily family, XmlElement familyElement) { familyElement.IfHasNode(MEMENTO_SOURCE_NODE).Do(node => { InstanceMemento sourceMemento = new XmlAttributeInstanceMemento(node); string context = string.Format("MementoSource for {0}\n{1}", family.PluginType.AssemblyQualifiedName, node.OuterXml); _builder.WithSystemObject<MementoSource>(sourceMemento, context, source => family.AddMementoSource(source)); }); }