Exemple #1
0
        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 SeoRouteValueDictionary(string siteMapNodeKey, string memberName, ISiteMap siteMap,
     IReservedAttributeNameProvider reservedAttributeNameProvider,
     IJsonToDictionaryDeserializer jsonToDictionaryDeserializer, ICache cache)
     : base(
         siteMapNodeKey, memberName, siteMap, reservedAttributeNameProvider, jsonToDictionaryDeserializer, cache)
 {
 }
Exemple #3
0
 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;
        }
Exemple #5
0
        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 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;
        }