private void ContentServiceMoved(Core.Events.MoveEventArgs <IContent> args)
        {
            // notify about the move for all moved items
            _notifier.Notify(_actions.GetAction <ActionMove>(), args.MoveInfoCollection.Select(m => m.Entity).ToArray());

            // for any items being moved from the recycle bin (restored), explicitly notify about that too
            var restoredEntities = args.MoveInfoCollection
                                   .Where(m => m.OriginalPath.Contains(Constants.System.RecycleBinContentString))
                                   .Select(m => m.Entity)
                                   .ToArray();

            if (restoredEntities.Any())
            {
                _notifier.Notify(_actions.GetAction <ActionRestore>(), restoredEntities);
            }
        }
 private void ContentService_Moved(IContentService sender, Core.Events.MoveEventArgs <IContent> args)
 => ContentServiceMoved(args);
 private void ContentService_Trashed(IContentService sender, Core.Events.MoveEventArgs <IContent> args)
 => _notifier.Notify(_actions.GetAction <ActionDelete>(), args.MoveInfoCollection.Select(m => m.Entity).ToArray());
 static void MediaServiceMoving(IMediaService sender, Core.Events.MoveEventArgs <Core.Models.IMedia> e)
 {
     DistributedCache.Instance.RefreshMediaCache(e.Entity);
 }
Exemplo n.º 5
0
 static void ContentServiceTrashed(IContentService sender, Core.Events.MoveEventArgs <IContent> e)
 {
     IndexConent(e.Entity);
 }
Exemplo n.º 6
0
 static void MediaServiceTrashed(IMediaService sender, Core.Events.MoveEventArgs <IMedia> e)
 {
     IndexMedia(e.Entity);
 }