Exemple #1
0
        public void Handle(ContentMovedNotification notification)
        {
            // notify about the move for all moved items
            _notifier.Notify(_actions.GetAction <ActionMove>(), notification.MoveInfoCollection.Select(m => m.Entity).ToArray());

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

            if (restoredEntities.Any())
            {
                _notifier.Notify(_actions.GetAction <ActionRestore>(), restoredEntities);
            }
        }
Exemple #2
0
 public void Handle(ContentMovedNotification notification) => CreateRedirectsForOldRoutes(notification);