public RouteValueDictionary( string siteMapNodeKey, string memberName, ISiteMap siteMap, IReservedAttributeNameProvider reservedAttributeNameProvider, IJsonToDictionaryDeserializer jsonToDictionaryDeserializer, ICache cache ) : base(siteMap, cache) { if (string.IsNullOrEmpty(siteMapNodeKey)) { throw new ArgumentNullException("siteMapNodeKey"); } if (string.IsNullOrEmpty(memberName)) { throw new ArgumentNullException("memberName"); } if (reservedAttributeNameProvider == null) { throw new ArgumentNullException("reservedAttributeNameProvider"); } if (jsonToDictionaryDeserializer == null) { throw new ArgumentNullException("jsonToDictionaryDeserializer"); } this.siteMapNodeKey = siteMapNodeKey; this.memberName = memberName; this.reservedAttributeNameProvider = reservedAttributeNameProvider; this.jsonToDictionaryDeserializer = jsonToDictionaryDeserializer; // An area route value must always exist, so we add it here to ensure it does. this["area"] = string.Empty; }
public SiteMapNodeHelperFactory( ISiteMapNodeCreatorFactory siteMapNodeCreatorFactory, IDynamicSiteMapNodeBuilderFactory dynamicSiteMapNodeBuilderFactory, IReservedAttributeNameProvider reservedAttributeNameProvider, ICultureContextFactory cultureContextFactory ) { if (siteMapNodeCreatorFactory == null) { throw new ArgumentNullException("siteMapNodeCreatorFactory"); } if (dynamicSiteMapNodeBuilderFactory == null) { throw new ArgumentNullException("dynamicSiteMapNodeBuilderFactory"); } if (reservedAttributeNameProvider == null) { throw new ArgumentNullException("reservedAttributeNameProvider"); } if (cultureContextFactory == null) { throw new ArgumentNullException("cultureContextFactory"); } this.siteMapNodeCreatorFactory = siteMapNodeCreatorFactory; this.dynamicSiteMapNodeBuilderFactory = dynamicSiteMapNodeBuilderFactory; this.reservedAttributeNameProvider = reservedAttributeNameProvider; this.cultureContextFactory = cultureContextFactory; }
public SiteMapNodeHelper( ISiteMap siteMap, ICultureContext cultureContext, ISiteMapNodeCreatorFactory siteMapNodeCreatorFactory, IDynamicSiteMapNodeBuilderFactory dynamicSiteMapNodeBuilderFactory, IReservedAttributeNameProvider reservedAttributeNameProvider, ICultureContextFactory cultureContextFactory ) { if (siteMap == null) throw new ArgumentNullException("siteMap"); if (cultureContext == null) throw new ArgumentNullException("cultureContext"); if (siteMapNodeCreatorFactory == null) throw new ArgumentNullException("siteMapNodeCreatorFactory"); if (dynamicSiteMapNodeBuilderFactory == null) throw new ArgumentNullException("dynamicSiteMapNodeBuilderFactory"); if (reservedAttributeNameProvider == null) throw new ArgumentNullException("reservedAttributeNameProvider"); if (cultureContextFactory == null) throw new ArgumentNullException("cultureContextFactory"); this.siteMap = siteMap; this.cultureContext = cultureContext; this.siteMapNodeCreatorFactory = siteMapNodeCreatorFactory; this.dynamicSiteMapNodeBuilderFactory = dynamicSiteMapNodeBuilderFactory; this.reservedAttributeNameProvider = reservedAttributeNameProvider; this.cultureContextFactory = cultureContextFactory; }
public SeoRouteValueDictionary(string siteMapNodeKey, string memberName, ISiteMap siteMap, IReservedAttributeNameProvider reservedAttributeNameProvider, IJsonToDictionaryDeserializer jsonToDictionaryDeserializer, ICache cache) : base( siteMapNodeKey, memberName, siteMap, reservedAttributeNameProvider, jsonToDictionaryDeserializer, cache) { }
public SeoRouteValueDictionary(string siteMapNodeKey, string memberName, ISiteMap siteMap, IReservedAttributeNameProvider reservedAttributeNameProvider, IJsonToDictionaryDeserializer jsonToDictionaryDeserializer, ICache cache) : base( siteMapNodeKey, memberName, siteMap, reservedAttributeNameProvider, jsonToDictionaryDeserializer, cache) { }
public AttributeDictionaryFactory( IRequestCache requestCache, IReservedAttributeNameProvider reservedAttributeNameProvider, IJsonToDictionaryDeserializer jsonToDictionaryDeserializer ) { if (requestCache == null) throw new ArgumentNullException("requestCache"); if (reservedAttributeNameProvider == null) throw new ArgumentNullException("reservedAttributeNameProvider"); if (jsonToDictionaryDeserializer == null) throw new ArgumentNullException("jsonToDictionaryDeserializer"); this.requestCache = requestCache; this.reservedAttributeNameProvider = reservedAttributeNameProvider; this.jsonToDictionaryDeserializer = jsonToDictionaryDeserializer; }
public SiteMapLoaderContainer(ConfigurationSettings settings) { // Singleton instances if (settings.EnableSiteMapFile) { this.absoluteFileName = HostingEnvironment.MapPath(settings.SiteMapFileName); } this.mvcContextFactory = new MvcContextFactory(); #if NET35 this.siteMapCache = new SiteMapCache(new AspNetCacheProvider<ISiteMap>(this.mvcContextFactory)); #else this.siteMapCache = new SiteMapCache(new RuntimeCacheProvider<ISiteMap>(System.Runtime.Caching.MemoryCache.Default)); #endif this.cacheDependency = this.ResolveCacheDependency(settings); this.requestCache = this.mvcContextFactory.GetRequestCache(); this.bindingFactory = new BindingFactory(); this.bindingProvider = new BindingProvider(this.bindingFactory, this.mvcContextFactory); this.urlPath = new UrlPath(this.mvcContextFactory, this.bindingProvider); this.siteMapCacheKeyGenerator = new SiteMapCacheKeyGenerator(this.mvcContextFactory); this.siteMapCacheKeyToBuilderSetMapper = new SiteMapCacheKeyToBuilderSetMapper(); this.reservedAttributeNameProvider = new ReservedAttributeNameProvider(settings.AttributesToIgnore); var siteMapNodeFactoryContainer = new SiteMapNodeFactoryContainer(settings, this.mvcContextFactory, this.urlPath, this.reservedAttributeNameProvider); this.siteMapNodeToParentRelationFactory = new SiteMapNodeToParentRelationFactory(); this.nodeKeyGenerator = new NodeKeyGenerator(); this.siteMapNodeFactory = siteMapNodeFactoryContainer.ResolveSiteMapNodeFactory(); this.siteMapNodeCreatorFactory = this.ResolveSiteMapNodeCreatorFactory(); this.cultureContextFactory = new CultureContextFactory(); this.dynamicSiteMapNodeBuilderFactory = new DynamicSiteMapNodeBuilderFactory(this.siteMapNodeCreatorFactory, this.cultureContextFactory); this.siteMapHierarchyBuilder = new SiteMapHierarchyBuilder(); this.siteMapNodeHelperFactory = this.ResolveSiteMapNodeHelperFactory(); this.siteMapNodeVisitor = this.ResolveSiteMapNodeVisitor(settings); this.siteMapXmlNameProvider = new SiteMapXmlNameProvider(); this.attributeAssemblyProviderFactory = new AttributeAssemblyProviderFactory(); this.mvcSiteMapNodeAttributeDefinitionProvider = new MvcSiteMapNodeAttributeDefinitionProvider(); this.siteMapNodeProvider = this.ResolveSiteMapNodeProvider(settings); this.siteMapBuiderSetStrategy = this.ResolveSiteMapBuilderSetStrategy(settings); var siteMapFactoryContainer = new SiteMapFactoryContainer(settings, this.mvcContextFactory, this.urlPath); this.siteMapFactory = siteMapFactoryContainer.ResolveSiteMapFactory(); this.siteMapCreator = new SiteMapCreator(this.siteMapCacheKeyToBuilderSetMapper, this.siteMapBuiderSetStrategy, this.siteMapFactory); }
public AttributeDictionary( string siteMapNodeKey, string memberName, ISiteMap siteMap, ILocalizationService localizationService, IReservedAttributeNameProvider reservedAttributeNameProvider, IJsonToDictionaryDeserializer jsonToDictionaryDeserializer, ICache cache ) : base(siteMap, cache) { if (string.IsNullOrEmpty(siteMapNodeKey)) { throw new ArgumentNullException("siteMapNodeKey"); } if (string.IsNullOrEmpty(memberName)) { throw new ArgumentNullException("memberName"); } if (localizationService == null) { throw new ArgumentNullException("localizationService"); } if (reservedAttributeNameProvider == null) { throw new ArgumentNullException("reservedAttributeNameProvider"); } if (jsonToDictionaryDeserializer == null) { throw new ArgumentNullException("jsonToDictionaryDeserializer"); } this.siteMapNodeKey = siteMapNodeKey; this.memberName = memberName; this.localizationService = localizationService; this.reservedAttributeNameProvider = reservedAttributeNameProvider; this.jsonToDictionaryDeserializer = jsonToDictionaryDeserializer; }
public SiteMapNodeFactoryContainer( ConfigurationSettings settings, IMvcContextFactory mvcContextFactory, IUrlPath urlPath, IReservedAttributeNameProvider reservedAttributeNameProvider) { if (settings.EnableSiteMapFile) { this.absoluteFileName = HostingEnvironment.MapPath(settings.SiteMapFileName); } this.settings = settings; this.mvcContextFactory = mvcContextFactory; this.requestCache = this.mvcContextFactory.GetRequestCache(); this.urlPath = urlPath; this.reservedAttributeNameProvider = reservedAttributeNameProvider; this.javaScriptSerializer = new JavaScriptSerializerAdapter(); this.jsonToDictionaryDeserializer = new JsonToDictionaryDeserializer(this.javaScriptSerializer, this.mvcContextFactory); this.assemblyProvider = new AttributeAssemblyProvider(settings.IncludeAssembliesForScan, settings.ExcludeAssembliesForScan); this.mvcSiteMapNodeAttributeProvider = new MvcSiteMapNodeAttributeDefinitionProvider(); this.dynamicNodeProviders = this.ResolveDynamicNodeProviders(); this.siteMapNodeUrlResolvers = this.ResolveSiteMapNodeUrlResolvers(); this.siteMapNodeVisibilityProviders = this.ResolveSiteMapNodeVisibilityProviders(settings.DefaultSiteMapNodeVisibiltyProvider); }
public SiteMapNodeFactoryContainer( ConfigurationSettings settings, IMvcContextFactory mvcContextFactory, IUrlPath urlPath, IReservedAttributeNameProvider reservedAttributeNameProvider) { if (settings.EnableSiteMapFile) { this.absoluteFileName = HostingEnvironment.MapPath(settings.SiteMapFileName); } this.settings = settings; this.mvcContextFactory = mvcContextFactory; this.requestCache = this.mvcContextFactory.GetRequestCache(); this.urlPath = urlPath; this.reservedAttributeNameProvider = reservedAttributeNameProvider; this.javaScriptSerializer = new JavaScriptSerializerAdapter(); this.jsonToDictionaryDeserializer = new JsonToDictionaryDeserializer(this.javaScriptSerializer, this.mvcContextFactory); this.assemblyProvider = new AttributeAssemblyProvider(settings.IncludeAssembliesForScan, settings.ExcludeAssembliesForScan); this.mvcSiteMapNodeAttributeProvider = new MvcSiteMapNodeAttributeDefinitionProvider(); this.dynamicNodeProviders = this.ResolveDynamicNodeProviders(); this.siteMapNodeUrlResolvers = this.ResolveSiteMapNodeUrlResolvers(); this.siteMapNodeVisibilityProviders = this.ResolveSiteMapNodeVisibilityProviders(settings.DefaultSiteMapNodeVisibiltyProvider); }
public SeoRouteValueDictionaryFactory( IRequestCache requestCache, IReservedAttributeNameProvider reservedAttributeNameProvider, IJsonToDictionaryDeserializer jsonToDictionaryDeserializer ) { if (requestCache == null) { throw new ArgumentNullException("requestCache"); } if (reservedAttributeNameProvider == null) { throw new ArgumentNullException("reservedAttributeNameProvider"); } if (jsonToDictionaryDeserializer == null) { throw new ArgumentNullException("jsonToDictionaryDeserializer"); } this.requestCache = requestCache; this.reservedAttributeNameProvider = reservedAttributeNameProvider; this.jsonToDictionaryDeserializer = jsonToDictionaryDeserializer; }