Esempio n. 1
0
 public ComposerFunctionUpdater()
 {
     _functions        = ReflectionHelper.GetTypesWithAttribute(typeof(FunctionTypeAttribute)).ToList();
     _contentTypes     = PageTypeHelper.GetPageTypes(ContentFunctionTypeManager.List());
     _pageTypes        = PageTypeManager.List().Select(p => new WrappedPageType(p)).ToList();
     RulesTimer        = new System.Diagnostics.Stopwatch();
     AccessTimer       = new System.Diagnostics.Stopwatch();
     ContentAreasTimer = new System.Diagnostics.Stopwatch();
 }
Esempio n. 2
0
        private void UpdateContentAreas(WrappedPageType functionType)
        {
            ContentAreasTimer.Start();

            var realPageType = PageType.Load(functionType.ID);

            if (realPageType != null)
            {
                ContentFunctionTypeManager.ReRegisterCA(realPageType);
            }

            ContentAreasTimer.Stop();
        }
Esempio n. 3
0
        public static void SetDefaultRulePageType(int pageTypeID)
        {
            RuleContentAreaCollection ruleCaCollection = RuleContentAreaManager.XMLRuleContentAreaList();
            PageType pageType = PageType.Load(pageTypeID);

            if (pageType != null)
            {
                List <ContentAreaData>      availableContentAreasViaProperty = ContentAreaManager.GetAvailableContentAreasViaProperty(pageType);
                IList <ContentFunctionType> list2 = ContentFunctionTypeManager.List();
                foreach (ContentAreaData data in availableContentAreasViaProperty)
                {
                    ruleCaCollection.RemoveRuleContentArea(pageType.ID, data.ID);
                    foreach (ContentFunctionType type2 in list2)
                    {
                        ruleCaCollection.AddRule(pageTypeID, data.ID, type2.FunctionTypeID);
                    }
                }
                RuleContentAreaManager.SaveRuleContentAreaCollection(ruleCaCollection);
            }
        }
Esempio n. 4
0
 public ComposerFunctionUpdater()
 {
     _functions    = ReflectionHelper.GetTypesWithAttribute(typeof(FunctionTypeAttribute)).ToList();
     _contentTypes = PageTypeHelper.GetPageTypes(ContentFunctionTypeManager.List());
     _pageTypes    = PageTypeManager.List();
 }
Esempio n. 5
0
 private void UpdateContentAreas(PageType functionType)
 {
     ContentFunctionTypeManager.ReRegisterCA(functionType);
 }