コード例 #1
0
        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;
        }
コード例 #2
0
        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;
        }
コード例 #3
0
        public SiteMapNodeHelper(
            string siteMapCacheKey,
            ISiteMap siteMap,
            ISiteMapNodeCreatorFactory siteMapNodeCreatorFactory,
            IDynamicSiteMapNodeBuilderFactory dynamicSiteMapNodeBuilderFactory,
            ISiteMapXmlReservedAttributeNameProvider reservedAttributeNameProvider
            )
        {
            if (String.IsNullOrEmpty(siteMapCacheKey))
            {
                throw new ArgumentNullException("siteMapCacheKey");
            }
            if (siteMap == null)
            {
                throw new ArgumentNullException("siteMap");
            }
            if (siteMapNodeCreatorFactory == null)
            {
                throw new ArgumentNullException("siteMapNodeCreatorFactory");
            }
            if (dynamicSiteMapNodeBuilderFactory == null)
            {
                throw new ArgumentNullException("dynamicSiteMapNodeBuilderFactory");
            }
            if (reservedAttributeNameProvider == null)
            {
                throw new ArgumentNullException("reservedAttributeNameProvider");
            }

            this.siteMapCacheKey                  = siteMapCacheKey;
            this.siteMap                          = siteMap;
            this.siteMapNodeCreatorFactory        = siteMapNodeCreatorFactory;
            this.dynamicSiteMapNodeBuilderFactory = dynamicSiteMapNodeBuilderFactory;
            this.reservedAttributeNameProvider    = reservedAttributeNameProvider;
        }
コード例 #4
0
        public SiteMapNodeHelper(
            string siteMapCacheKey,
            ISiteMap siteMap,
            ISiteMapNodeCreatorFactory siteMapNodeCreatorFactory,
            IDynamicSiteMapNodeBuilderFactory dynamicSiteMapNodeBuilderFactory,
            ISiteMapXmlReservedAttributeNameProvider reservedAttributeNameProvider
            )
        {
            if (String.IsNullOrEmpty(siteMapCacheKey))
                throw new ArgumentNullException("siteMapCacheKey");
            if (siteMap == null)
                throw new ArgumentNullException("siteMap");
            if (siteMapNodeCreatorFactory == null)
                throw new ArgumentNullException("siteMapNodeCreatorFactory");
            if (dynamicSiteMapNodeBuilderFactory == null)
                throw new ArgumentNullException("dynamicSiteMapNodeBuilderFactory");
            if (reservedAttributeNameProvider == null)
                throw new ArgumentNullException("reservedAttributeNameProvider");

            this.siteMapCacheKey = siteMapCacheKey;
            this.siteMap = siteMap;
            this.siteMapNodeCreatorFactory = siteMapNodeCreatorFactory;
            this.dynamicSiteMapNodeBuilderFactory = dynamicSiteMapNodeBuilderFactory;
            this.reservedAttributeNameProvider = reservedAttributeNameProvider;
        }
 public DynamicSiteMapNodeBuilderFactory(
     ISiteMapNodeCreatorFactory siteMapNodeCreatorFactory
     )
 {
     if (siteMapNodeCreatorFactory == null)
         throw new ArgumentNullException("siteMapNodeCreatorFactory");
     this.siteMapNodeCreatorFactory = siteMapNodeCreatorFactory;
 }
コード例 #6
0
 public DynamicSiteMapNodeBuilderFactory(
     ISiteMapNodeCreatorFactory siteMapNodeCreatorFactory
     )
 {
     if (siteMapNodeCreatorFactory == null)
     {
         throw new ArgumentNullException("siteMapNodeCreatorFactory");
     }
     this.siteMapNodeCreatorFactory = siteMapNodeCreatorFactory;
 }
コード例 #7
0
        public DynamicSiteMapNodeBuilderFactory(
            ISiteMapNodeCreatorFactory siteMapNodeCreatorFactory,
            ICultureContextFactory cultureContextFactory
            )
        {
            if (siteMapNodeCreatorFactory == null)
                throw new ArgumentNullException("siteMapNodeCreatorFactory");
            if (cultureContextFactory == null)
                throw new ArgumentNullException("cultureContextFactory");

            this.siteMapNodeCreatorFactory = siteMapNodeCreatorFactory;
            this.cultureContextFactory = cultureContextFactory;
        }
コード例 #8
0
        public SiteMapNodeHelperFactory(
            ISiteMapNodeCreatorFactory siteMapNodeCreatorFactory,
            IDynamicSiteMapNodeBuilderFactory dynamicSiteMapNodeBuilderFactory,
            ISiteMapXmlReservedAttributeNameProvider reservedAttributeNameProvider
            )
        {
            if (siteMapNodeCreatorFactory == null)
                throw new ArgumentNullException("siteMapNodeCreatorFactory");
            if (dynamicSiteMapNodeBuilderFactory == null)
                throw new ArgumentNullException("dynamicSiteMapNodeBuilderFactory");
            if (reservedAttributeNameProvider == null)
                throw new ArgumentNullException("reservedAttributeNameProvider");

            this.siteMapNodeCreatorFactory = siteMapNodeCreatorFactory;
            this.dynamicSiteMapNodeBuilderFactory = dynamicSiteMapNodeBuilderFactory;
            this.reservedAttributeNameProvider = reservedAttributeNameProvider;
        }
        public DynamicSiteMapNodeBuilderFactory(
            ISiteMapNodeCreatorFactory siteMapNodeCreatorFactory,
            ICultureContextFactory cultureContextFactory
            )
        {
            if (siteMapNodeCreatorFactory == null)
            {
                throw new ArgumentNullException("siteMapNodeCreatorFactory");
            }
            if (cultureContextFactory == null)
            {
                throw new ArgumentNullException("cultureContextFactory");
            }

            this.siteMapNodeCreatorFactory = siteMapNodeCreatorFactory;
            this.cultureContextFactory     = cultureContextFactory;
        }
コード例 #10
0
 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);
 }
コード例 #11
0
        public SiteMapNodeHelperFactory(
            ISiteMapNodeCreatorFactory siteMapNodeCreatorFactory,
            IDynamicSiteMapNodeBuilderFactory dynamicSiteMapNodeBuilderFactory,
            ISiteMapXmlReservedAttributeNameProvider reservedAttributeNameProvider
            )
        {
            if (siteMapNodeCreatorFactory == null)
            {
                throw new ArgumentNullException("siteMapNodeCreatorFactory");
            }
            if (dynamicSiteMapNodeBuilderFactory == null)
            {
                throw new ArgumentNullException("dynamicSiteMapNodeBuilderFactory");
            }
            if (reservedAttributeNameProvider == null)
            {
                throw new ArgumentNullException("reservedAttributeNameProvider");
            }

            this.siteMapNodeCreatorFactory        = siteMapNodeCreatorFactory;
            this.dynamicSiteMapNodeBuilderFactory = dynamicSiteMapNodeBuilderFactory;
            this.reservedAttributeNameProvider    = reservedAttributeNameProvider;
        }