Пример #1
0
 private static void IDynamicContentCreatedEvent(IDynamicContentCreatedEvent eventInfo)
 {
     if (eventInfo.Item.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live)
     {
         if (eventInfo.Item.GetType() == HogwartsConstants.activityType)
         {
             // A new activity was created. Purge the cache for whichever house it belongs to
             CacheDependency.Notify(new List <CacheDependencyKey>()
             {
                 new CacheDependencyKey()
                 {
                     Key = eventInfo.Item.SystemParentId.ToString(), Type = HogwartsConstants.houseType
                 }
             });
         }
         else if (eventInfo.Item.GetType() == HogwartsConstants.houseType)
         {
             // House has been created. Purge the HouseKeys cache so the new house appears in the list
             // ... Yes. I know that Hogwarts will only ever have 4 houses...
             CacheDependency.Notify(new List <CacheDependencyKey>()
             {
                 new CacheDependencyKey()
                 {
                     Key = HogwartsConstants.cacheKeysInstanceName, Type = HogwartsConstants.houseType
                 }
             });
         }
     }
 }
Пример #2
0
        private void DynamicContentCreatedEventHandler(IDynamicContentCreatedEvent evt)
        {
            var item     = evt.Item;
            var itemType = item.GetType();
            var url      = HttpContext.Current.Request.Url.Host;

            var helper = new IAFCHandBookHelper(url);

            if (itemType == helper.ResourceType ||
                itemType == helper.ExternalResourcesType)
            {
                if (item.Status == ContentLifecycleStatus.Live && item.Visible)
                {
                    if (helper.IsResourceContainedWithinTopicsCategory(item.Id, itemType))
                    {
                        helper.CreateIAFCHandBookResourcesData(item.Id, itemType);
                    }
                }
            }
        }
Пример #3
0
 /// <summary>
 /// Dynamics the content updated event_ handler.
 /// </summary>
 /// <param name="event">The event.</param>
 private static void DynamicContentCreatedEvent(IDynamicContentCreatedEvent eventInfo)
 {
 }
 private void ReportCreated(IDynamicContentCreatedEvent @event)
 {
     DynamicContentViewMasterCustom.permissionsTaxa.Clear();
 }
Пример #5
0
 private void ReportCreated(IDynamicContentCreatedEvent @event)
 {
     DynamicContentViewMasterCustom.permissionsTaxa.Clear();
 }