public void UnmapBlendingPoint(WebSection webSection)
        {
            if (webSection.Template == null)
            {
                // if the Surface (WebTemplate) was deleted earlier
                return;
            }
            string token  = webSection.GetMappingToken();
            string mapUri = webSection.GetMappingUrl();

            foreach (WebMap webMap in webSection.Maps)
            {
                UnmapPinningRule(webMap);
            }
            Blender.UnmapUri(mapUri, token);
            if (Handle.IsHandlerRegistered("GET " + mapUri, selfOnlyOptions))
            {
                Handle.UnregisterHttpHandler("GET", mapUri);
            }
        }
        public void UnmapPinningRule(WebMap webMap)
        {
            if (webMap.Section?.Template == null)
            {
                // if the Blending Point (WebSection) or the Surface (WebTemplate) was deleted earlier
                return;
            }
            string token  = webMap.GetMappingToken();
            string mapUri = webMap.GetMappingUrl();

            Blender.UnmapUri(webMap.ForeignUrl, token);

            if (webMap.Url != null)
            {
                var uriByTokenCount = Blender.ListAll().Where(x => x.Key == token).SelectMany(x => x.Value).Count();
                if (uriByTokenCount == 2) // one URI for empty WebMap's handler and another one for empty WebSection's handler
                {
                    Blender.UnmapUri(mapUri, token);
                    Handle.UnregisterHttpHandler("GET", mapUri);
                }
            }
        }