/// <summary>
        /// Ingests items
        /// </summary>
        /// <param name="args">
        /// The args.
        /// </param>
        public override void Process(MediaCleanupItemArgs args)
        {
            Assert.ArgumentNotNull(args, "args");
            Assert.ArgumentNotNull(args.Item, "args.Item");

            ICleanupLinksExecuter executer = MediaFrameworkContext.GetCleanupLinksExecuter(args.Item);

            if (executer != null)
            {
                executer.CleanupLinks(args.Item);
            }
        }
예제 #2
0
        /// <summary>
        /// Ingests items
        /// </summary>
        /// <param name="args">
        /// The args.
        /// </param>
        public override void Process(MediaCleanupItemArgs args)
        {
            Assert.ArgumentNotNull(args, "args");
            Assert.ArgumentNotNull(args.Item, "args.Item");

            try
            {
                if (args.Item.Access.CanDelete())
                {
                    this.RemoveItem(args.Item);
                }
                else
                {
                    args.AbortPipeline();
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error("Deleting Item Failed.", this, ex);
            }
        }
 /// <summary>
 /// The run.
 /// </summary>
 /// <param name="args">
 /// The args.
 /// </param>
 public static void Run(MediaCleanupItemArgs args)
 {
     Assert.ArgumentNotNull(args, "args");
     CorePipeline.Run("mediaFramework.mediaCleanupItem", args);
 }