Ejemplo n.º 1
0
        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));
            }
        }