public SiteMap( ISiteMapPluginProvider pluginProvider, IMvcContextFactory mvcContextFactory, ISiteMapChildStateFactory siteMapChildStateFactory, IUrlPath urlPath, ISiteMapSettings siteMapSettings ) { if (pluginProvider == null) throw new ArgumentNullException("pluginProvider"); if (mvcContextFactory == null) throw new ArgumentNullException("mvcContextFactory"); if (siteMapChildStateFactory == null) throw new ArgumentNullException("siteMapChildStateFactory"); if (urlPath == null) throw new ArgumentNullException("urlPath"); if (siteMapSettings == null) throw new ArgumentNullException("siteMapSettings"); this.pluginProvider = pluginProvider; this.mvcContextFactory = mvcContextFactory; this.siteMapChildStateFactory = siteMapChildStateFactory; this.urlPath = urlPath; this.siteMapSettings = siteMapSettings; // Initialize dictionaries this.childNodeCollectionTable = siteMapChildStateFactory.CreateChildNodeCollectionDictionary(); this.keyTable = siteMapChildStateFactory.CreateKeyDictionary(); this.parentNodeTable = siteMapChildStateFactory.CreateParentNodeDictionary(); this.urlTable = siteMapChildStateFactory.CreateUrlDictionary(); }
public LockableSiteMap( ISiteMapPluginProvider pluginProvider, IMvcContextFactory mvcContextFactory, ISiteMapChildStateFactory siteMapChildStateFactory, IUrlPath urlPath, ISiteMapSettings siteMapSettings ) : base(pluginProvider, mvcContextFactory, siteMapChildStateFactory, urlPath, siteMapSettings) { }
public RequestCacheableSiteMap( ISiteMapPluginProvider pluginProvider, IMvcContextFactory mvcContextFactory, ISiteMapChildStateFactory siteMapChildStateFactory, IUrlPath urlPath, ISiteMapSettings siteMapSettings, IRequestCache requestCache ) : base(pluginProvider, mvcContextFactory, siteMapChildStateFactory, urlPath, siteMapSettings) { if (requestCache == null) throw new ArgumentNullException("requestCache"); this.requestCache = requestCache; }
public RequestCacheableSiteMap( ISiteMapPluginProvider pluginProvider, IMvcContextFactory mvcContextFactory, ISiteMapChildStateFactory siteMapChildStateFactory, IUrlPath urlPath, ISiteMapSettings siteMapSettings, IRequestCache requestCache ) : base(pluginProvider, mvcContextFactory, siteMapChildStateFactory, urlPath, siteMapSettings) { if (requestCache == null) { throw new ArgumentNullException("requestCache"); } this.requestCache = requestCache; }
public SiteMap( ISiteMapPluginProvider pluginProvider, IMvcContextFactory mvcContextFactory, ISiteMapChildStateFactory siteMapChildStateFactory, IUrlPath urlPath, ISiteMapSettings siteMapSettings ) { if (pluginProvider == null) { throw new ArgumentNullException("pluginProvider"); } if (mvcContextFactory == null) { throw new ArgumentNullException("mvcContextFactory"); } if (siteMapChildStateFactory == null) { throw new ArgumentNullException("siteMapChildStateFactory"); } if (urlPath == null) { throw new ArgumentNullException("urlPath"); } if (siteMapSettings == null) { throw new ArgumentNullException("siteMapSettings"); } this.pluginProvider = pluginProvider; this.mvcContextFactory = mvcContextFactory; this.siteMapChildStateFactory = siteMapChildStateFactory; this.urlPath = urlPath; this.siteMapSettings = siteMapSettings; // Initialize dictionaries this.childNodeCollectionTable = siteMapChildStateFactory.CreateChildNodeCollectionDictionary(); this.keyTable = siteMapChildStateFactory.CreateKeyDictionary(); this.parentNodeTable = siteMapChildStateFactory.CreateParentNodeDictionary(); this.urlTable = siteMapChildStateFactory.CreateUrlDictionary(); }
public virtual ISiteMap Create(ISiteMapBuilder siteMapBuilder, ISiteMapSettings siteMapSettings) { var routes = mvcContextFactory.GetRoutes(); var requestCache = mvcContextFactory.GetRequestCache(); // IMPORTANT: We need to ensure there is one instance of controllerTypeResolver and // one instance of ActionMethodParameterResolver per SiteMap instance because each of // these classes does internal caching. var controllerTypeResolver = controllerTypeResolverFactory.Create(routes); var actionMethodParameterResolver = actionMethodParameterResolverFactory.Create(); var mvcResolver = mvcResolverFactory.Create(controllerTypeResolver, actionMethodParameterResolver); var pluginProvider = pluginProviderFactory.Create(siteMapBuilder, mvcResolver); return new RequestCacheableSiteMap( pluginProvider, mvcContextFactory, siteMapChildStateFactory, urlPath, siteMapSettings, requestCache); }
public virtual ISiteMap Create(ISiteMapBuilder siteMapBuilder, ISiteMapSettings siteMapSettings) { var routes = mvcContextFactory.GetRoutes(); var requestCache = mvcContextFactory.GetRequestCache(); // IMPORTANT: We need to ensure there is one instance of controllerTypeResolver and // one instance of ActionMethodParameterResolver per SiteMap instance because each of // these classes does internal caching. var controllerTypeResolver = controllerTypeResolverFactory.Create(routes); var actionMethodParameterResolver = actionMethodParameterResolverFactory.Create(); var mvcResolver = mvcResolverFactory.Create(controllerTypeResolver, actionMethodParameterResolver); var pluginProvider = pluginProviderFactory.Create(siteMapBuilder, mvcResolver); return(new RequestCacheableSiteMap( pluginProvider, mvcContextFactory, siteMapChildStateFactory, urlPath, siteMapSettings, requestCache)); }