コード例 #1
0
 void FilterEvent(IContentService sender, Umbraco.Core.Events.CopyEventArgs <IContent> e)
 {
     //check if this is a valid content type
     if (ContentTypeAliases.Contains(e.Original.ContentType.Alias))
     {
         MethodToBind.Invoke(null, new object[] { sender, e });
     }
 }
コード例 #2
0
        private void ContentService_Copied(IContentService sender, Umbraco.Core.Events.CopyEventArgs <IContent> e)
        {
            if (uSyncEvents.Paused)
            {
                return;
            }

            SaveItems(sender, new List <IContent>(new IContent[] { e.Copy }));
        }
コード例 #3
0
ファイル: UmbracoStartupEvent.cs プロジェクト: vamone/Routing
        protected void ContentService_Copied(IContentService sender, Umbraco.Core.Events.CopyEventArgs <IContent> e)
        {
            // Remove any cache associated to the modified content node
            Routing.Helpers.CacheHelper.Remove(string.Format(Routing.Constants.Cache.NodeDependencyCacheIdPattern, e.Copy.Id));
            new Controllers.PersistentCacheController().Remove(e.Copy.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);
        }