private void StartClientPipeline(object obj, string methodName, ClientPipelineArgs args)
        {
            Assert.ArgumentNotNull(obj, "obj");
            Assert.ArgumentNotNullOrEmpty(methodName, "methodName");
            Assert.ArgumentNotNull((object)args, "args");
            ContinuationManager   current = ContinuationManager.Current;
            ISupportsContinuation @object = obj as ISupportsContinuation;

            if (current != null && @object != null)
            {
                current.Start(@object, methodName, args);
            }
            else
            {
                Context.ClientPage.Start(obj, methodName, args);
            }
        }
示例#2
0
        public override void Execute(CommandContext context)
        {
            Assert.ArgumentNotNull(context, "context");

            ClientPipelineArgs args = new ClientPipelineArgs();

            args.Parameters["entryids"] = context.Parameters["entryids"];

            ContinuationManager current = ContinuationManager.Current;

            if (current != null)
            {
                current.Start(this, "Run", args);
            }
            else
            {
                Context.ClientPage.Start(this, "Run", args);
            }
        }
示例#3
0
        public override void Execute(CommandContext context)
        {
            Assert.ArgumentNotNull(context, "context");

            ClientPipelineArgs args = new ClientPipelineArgs();

            ListString list = new ListString(context.Parameters["entryids"]);

            bool isNew = context.Parameters["new"] == "1";

            if (list.Items.Any() && !isNew)
            {
                Guid entryId = MainUtil.GetGuid(list.Items.FirstOrDefault(), Guid.Empty);
                if (entryId != Guid.Empty)
                {
                    RedirectEntry entry = RedirectManager.GetRedirect(entryId);
                    if (entry != null)
                    {
                        args.Parameters["entryid"]     = entryId.ToString();
                        args.Parameters["oldpath"]     = entry.OldPath;
                        args.Parameters["itemid"]      = entry.ItemID.ToString();
                        args.Parameters["querystring"] = entry.QueryString;
                        args.Parameters["site"]        = entry.Site;
                    }
                }
            }


            ContinuationManager current = ContinuationManager.Current;

            if (current != null)
            {
                current.Start(this, "Run", args);
            }
            else
            {
                Context.ClientPage.Start(this, "Run", args);
            }
        }