コード例 #1
0
 void FilterEvent(IContentService sender, Umbraco.Core.Events.RollbackEventArgs <IContent> e)
 {
     //check if this is a valid content type
     if (ContentTypeAliases.Contains(e.Entity.ContentType.Alias))
     {
         MethodToBind.Invoke(null, new object[] { sender, e });
     }
 }
コード例 #2
0
ファイル: UmbracoStartupEvent.cs プロジェクト: vamone/Routing
        protected void ContentService_RolledBack(IContentService sender, Umbraco.Core.Events.RollbackEventArgs <IContent> e)
        {
            // Remove any cache associated to the modified content nodes
            Routing.Helpers.CacheHelper.Remove(string.Format(Routing.Constants.Cache.NodeDependencyCacheIdPattern, e.Entity.Id));
            new Controllers.PersistentCacheController().Remove(e.Entity.Id);

            // Remove all Ulrs cached for which no content node was found
            Routing.Helpers.CacheHelper.Remove(string.Format(Routing.Constants.Cache.NodeDependencyCacheIdPattern, 0));
            new Controllers.PersistentCacheController().Remove(0);
        }
コード例 #3
0
ファイル: ContentHandlers.cs プロジェクト: skartknet/uSlack
        public void ContentService_RolledBack(Umbraco.Core.Services.IContentService sender, Umbraco.Core.Events.RollbackEventArgs <Umbraco.Core.Models.IContent> e)
        {
            var properties = new PropertiesDictionary(e.Entity);

            AsyncUtil.RunSync(() => _messagingService.SendMessageAsync("contentService", "rolledBack", properties));
        }