private static void WriteMarker(NodeBase node, XContainer topic) { var keyIcon = node.Icon as KeyIcon; if (keyIcon == null) { return; } var marker = MarkerMapping.ResolveXmind(keyIcon.Key); if (marker != null) { topic.Add( new XElement(Namespaces.Content("marker-refs"), new XElement(Namespaces.Content("marker-ref"), new XAttribute("marker-id", marker)))); } }
private static void ReadMarker(this XContainer topic, NodeBase node) { var markerRefs = topic.Element(Namespaces.Content("marker-refs")); if (markerRefs == null) { return; } var markerId = markerRefs.Elements(Namespaces.Content("marker-ref")).Select(x => x.Attribute("marker-id")?.Value).FirstOrDefault(x => x != null); if (string.IsNullOrWhiteSpace(markerId)) { return; } var icon = MarkerMapping.ResolveMindapp(markerId); if (icon != null) { node.ChangeIconTransactional(new KeyIcon(icon)); } }