Пример #1
0
        public void Process(ClientPipelineArgs args)
        {
            Assert.ArgumentNotNull(args, "args");
            Assert.ArgumentNotNull(args.Parameters, "args.Parameters");

            if (args.Parameters["copy"] == "1" || !MediaFrameworkContext.IsExportAllowed(args.Parameters["database"]))
            {
                return;
            }

            Item item = this.GetItem(args);

            item.ExportMove();
        }
        public void Process(SaveArgs args)
        {
            Assert.ArgumentNotNull(args, "args");
            Assert.ArgumentNotNull(args.Items, "args.Items");

            var database = Context.ContentDatabase;

            if (!MediaFrameworkContext.IsExportAllowed(database.Name))
            {
                return;
            }

            foreach (SaveArgs.SaveItem saveItem in args.Items)
            {
                Item item = database.Items[saveItem.ID, saveItem.Language, saveItem.Version];

                item.ExportUpdate(saveItem);
            }
        }
Пример #3
0
        /// <summary>
        /// Processes export operation preparing and sending.
        /// </summary>
        /// <param name="args">The args.</param>
        public virtual void Process(ClientPipelineArgs args)
        {
            Assert.ArgumentNotNull(args, "args");
            Assert.ArgumentNotNull(args.Parameters, "args.Parameters");

            string databaseName = args.Parameters["database"];

            if (!MediaFrameworkContext.IsExportAllowed(databaseName))
            {
                return;
            }

            Database database = Factory.GetDatabase(databaseName);

            ID[] ids = ID.ParseArray(args.Parameters["items"]);

            foreach (ID itemId in ids)
            {
                Item item = database.GetItem(itemId);

                item.ExportDelete();
            }
        }
Пример #4
0
 public override CommandState QueryState(CommandContext context)
 {
     return(MediaFrameworkContext.IsExportAllowed() ? CommandState.Enabled : CommandState.Hidden);
 }
 protected override bool Execute(T ruleContext)
 {
     return(MediaFrameworkContext.IsExportAllowed());
 }