/// <summary>
        /// 从缓存中加载数据, 或加载数据后并缓存
        /// </summary>
        /// <returns></returns>
        public NavSiteMap GetCachedMap()
        {
            string cacheKey = _mapFile;

            NavSiteMap result = null;

            if (SiteMapCache.Instance.TryGetValue(cacheKey, out result) == false)
            {
                result = GetMap();
                FileCacheDependency fd = new FileCacheDependency(false, _mapFile);
                SiteMapCache.Instance.Add(cacheKey, result, fd);
            }
            return(result);
        }
        private NavSiteMap GetMap()
        {
            if (string.IsNullOrEmpty(_mapFile) || File.Exists(_mapFile) == false)
            {
                throw new ApplicationException("导航文件无效。 MapFile=" + _mapFile);
            }


            XDocument xdoc = XDocument.Load(_mapFile);

            NavSiteMap result = new NavSiteMap();

            result.Nodes = ParseNodes(xdoc.Root.Elements().First().Elements()); //必须有个SiteMapNode根节点, 但这个节点不需要属性

            return(result);
        }