Esempio n. 1
0
        public HotspotNode BeginHotspot(string identifier)
        {
            var hotspotNode = new HotspotNode(identifier);

            BeginLevel(hotspotNode);
            // remember this node until the APS Body begins (which is when attributes are over)
            _currentNode = hotspotNode;
            // even though this is a hotspot element; say we don't want to keep it
            // adding attributes to it will make it viable
            _shouldKeepHotspot = false;
            return(hotspotNode);
        }
Esempio n. 2
0
 public void SealHotspot()
 {
     if (_currentNode != null && !_shouldKeepHotspot)
     {
         // discard a started hotspot when no viable attributes have been seen until this point
         EndHotspot();
         CurrentLevelNodes.Remove(_currentNode);
         // replace the current APS stack value; otherwise EndHotspot will be called twice
         var currentAps = EndAPS();
         BeginAPS(new BeginApplicationStructure(currentAps.Identifier, "NotAHotspot", currentAps.Inheritance));
     }
     // reset the node; should be called when the APS Body begins (ie. no more attributes for this node follow)
     _currentNode = null;
 }