public RequestCacheableSiteMapNode( ISiteMap siteMap, string key, bool isDynamic, ISiteMapNodePluginProvider pluginProvider, IMvcContextFactory mvcContextFactory, ISiteMapNodeChildStateFactory siteMapNodeChildStateFactory, ILocalizationService localizationService, IUrlPath urlPath ) : base( siteMap, key, isDynamic, pluginProvider, mvcContextFactory, siteMapNodeChildStateFactory, localizationService, urlPath ) { if (mvcContextFactory == null) { throw new ArgumentNullException("mvcContextFactory"); } this.requestCache = mvcContextFactory.GetRequestCache(); }
public JsonToDictionaryDeserializer( IJavaScriptSerializer javaScriptSerializer, IMvcContextFactory mvcContextFactory ) { if (javaScriptSerializer == null) throw new ArgumentNullException("javaScriptSerializer"); if (mvcContextFactory == null) throw new ArgumentNullException("mvcContextFactory"); this.javaScriptSerializer = javaScriptSerializer; this.requestCache = mvcContextFactory.GetRequestCache(); }
public JsonToDictionaryDeserializer( IJavaScriptSerializer javaScriptSerializer, IMvcContextFactory mvcContextFactory ) { if (javaScriptSerializer == null) { throw new ArgumentNullException("javaScriptSerializer"); } if (mvcContextFactory == null) { throw new ArgumentNullException("mvcContextFactory"); } this.javaScriptSerializer = javaScriptSerializer; this.requestCache = mvcContextFactory.GetRequestCache(); }
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)); }