public override void Process(CreateVersionArgs arguments)
        {
            Assert.ArgumentNotNull(arguments, "arguments");
            if (arguments.Result != null)
            {
                return;
            }
            ReadArgs readArgs = new ReadArgs(arguments.Scope);

            CorePipeline.Run("itemWebApiRead", readArgs);
            arguments.Result = readArgs.Result;
        }
Exemple #2
0
        public override void Process(CreateVersionArgs arguments)
        {
            Assert.ArgumentNotNull(arguments, "arguments");
            System.Web.HttpRequest request = arguments.Context.HttpContext.Request;
            if (request.Form.AllKeys.Length == 0)
            {
                return;
            }
            UpdateArgs updateArgs = new UpdateArgs(arguments.Scope);

            CorePipeline.Run("itemWebApiUpdate", updateArgs);
            arguments.Result = updateArgs.Result;
        }
Exemple #3
0
        public override void Process(CreateVersionArgs arguments)
        {
            Assert.ArgumentNotNull(arguments, "arguments");
            List <Item> list = new List <Item>(arguments.Scope.Length);

            Item[] scope = arguments.Scope;
            for (int i = 0; i < scope.Length; i++)
            {
                Item itm = scope[i];
                if (itm != null)
                {
                    Item _itm = itm.Versions.AddVersion();
                    if (_itm != null)
                    {
                        list.Add(_itm);
                    }
                }
            }
            arguments.Scope = list.ToArray();
        }