public override void ExecuteSubFunction(WxeContext context) { ArgumentUtility.CheckNotNull("context", context); Parameters.SubFunction.Execute(context); ExecutionStateContext.SetExecutionState(new PostProcessingSubFunctionState(ExecutionStateContext, Parameters)); }
public override void ExecuteSubFunction(WxeContext context) { NameValueCollection postBackCollection = BackupPostBackCollection(); Parameters.Page.SaveAllState(); var parameters = new PreparingRedirectToSubFunctionStateParameters(Parameters.SubFunction, postBackCollection, Parameters.PermaUrlOptions); ExecutionStateContext.SetExecutionState(new PreparingRedirectToSubFunctionState(ExecutionStateContext, parameters, _returnOptions)); }
//TODO: CleanUp duplication with other PostProcessSubFunction-implemenations public override void ExecuteSubFunction(WxeContext context) { ArgumentUtility.CheckNotNull("context", context); // Correct the PostBack-Sequence number Parameters.PostBackCollection[WxePageInfo.PostBackSequenceNumberID] = context.PostBackID.ToString(); // Provide the executed sub-function and backed up postback data to the executing page ExecutionStateContext.SetReturnState(Parameters.SubFunction, true, Parameters.PostBackCollection); ExecutionStateContext.SetExecutionState(NullExecutionState.Null); }
public override void ExecuteSubFunction(WxeContext context) { ArgumentUtility.CheckNotNull("context", context); string destinationUrl = GetDestinationPermanentUrl(context); string resumeUrl = context.GetResumeUrl(false); ExecutionStateContext.SetExecutionState( new RedirectingToSubFunctionState( ExecutionStateContext, new RedirectingToSubFunctionStateParameters(Parameters.SubFunction, Parameters.PostBackCollection, destinationUrl, resumeUrl))); }
public override void ExecuteSubFunction(WxeContext context) { ArgumentUtility.CheckNotNull("context", context); try { context.HttpContext.Response.Redirect(Parameters.DestinationUrl); throw new InvalidOperationException(string.Format("Redirect to '{0}' failed.", Parameters.DestinationUrl)); } catch (ThreadAbortException) { ExecutionStateContext.SetExecutionState(new PostProcessingSubFunctionState(ExecutionStateContext, Parameters)); throw; } }
public override void ExecuteSubFunction(WxeContext context) { ArgumentUtility.CheckNotNull("context", context); string functionToken = context.GetFunctionTokenForExternalFunction(Parameters.SubFunction, _returnOptions.IsReturning); string destinationUrl = context.GetDestinationUrlForExternalFunction(Parameters.SubFunction, functionToken, Parameters.PermaUrlOptions); if (_returnOptions.IsReturning) { NameValueCollection callerUrlParameters = _returnOptions.CallerUrlParameters.Clone(); callerUrlParameters.Set(WxeHandler.Parameters.WxeFunctionToken, context.FunctionToken); Parameters.SubFunction.ReturnUrl = context.GetPermanentUrl(ExecutionStateContext.CurrentFunction.GetType(), callerUrlParameters); } ExecutionStateContext.SetExecutionState( new RedirectingToSubFunctionState( ExecutionStateContext, new RedirectingToSubFunctionStateParameters(Parameters.SubFunction, Parameters.PostBackCollection, destinationUrl))); }
public override void ExecuteSubFunction(WxeContext context) { Parameters.SubFunction.SetParentStep(ExecutionStateContext.CurrentStep); NameValueCollection postBackCollection = BackupPostBackCollection(); EnsureSenderPostBackRegistration(postBackCollection); Parameters.Page.SaveAllState(); if (Parameters.PermaUrlOptions.UsePermaUrl) { var parameters = new PreparingRedirectToSubFunctionStateParameters(Parameters.SubFunction, postBackCollection, Parameters.PermaUrlOptions); ExecutionStateContext.SetExecutionState(new PreparingRedirectToSubFunctionState(ExecutionStateContext, parameters)); } else { var parameters = new ExecutionStateParameters(Parameters.SubFunction, postBackCollection); ExecutionStateContext.SetExecutionState(new ExecutingSubFunctionWithoutPermaUrlState(ExecutionStateContext, parameters)); } }
//TODO: CleanUp duplication with other PostProcessSubFunction-implemenations public override void ExecuteSubFunction(WxeContext context) { ArgumentUtility.CheckNotNull("context", context); bool isPostRequest = string.Equals(context.HttpContext.Request.HttpMethod, "POST", StringComparison.OrdinalIgnoreCase); if (isPostRequest) { // Provide the executed sub-function to the executing page and use original postback data ExecutionStateContext.SetReturnState(Parameters.SubFunction, false, null); } else { // Correct the PostBack-Sequence number Parameters.PostBackCollection[WxePageInfo.PostBackSequenceNumberID] = context.PostBackID.ToString(); // Provide the executed sub-function and the backed up postback data to the executing page ExecutionStateContext.SetReturnState(Parameters.SubFunction, true, Parameters.PostBackCollection); } ExecutionStateContext.SetExecutionState(NullExecutionState.Null); }