/// <summary> /// Called before an action result executes. /// </summary> /// <param name="filterContext">The filter context.</param> public virtual void OnResultExecuting(ResultExecutingContext filterContext) { SiteMapBase siteMap = string.IsNullOrEmpty(SiteMapName) ? SiteMaps.DefaultSiteMap : SiteMaps[SiteMapName]; string viewDataKey = ViewDataKey ?? DefaultViewDataKey; filterContext.Controller.ViewData[viewDataKey] = siteMap; }
/// <summary> /// Initializes a new instance of the <see cref="SiteMapBuilder"/> class. /// </summary> /// <param name="siteMap">The site map.</param> public SiteMapBuilder(SiteMapBase siteMap) { this.siteMap = siteMap; siteMapNodeBuilder = new SiteMapNodeBuilder(this.siteMap.RootNode); }