Calyptus.Mvc.HttpAsyncActionHandler.BeginProcessRequest C# (CSharp) Method

BeginProcessRequest() public method

public BeginProcessRequest ( HttpContext context, AsyncCallback callback, object state ) : IAsyncResult
context System.Web.HttpContext
callback AsyncCallback
state object
return IAsyncResult
		public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback callback, object state)
		{
			//if (Context is HttpContextWrapper) (Context as HttpContextWrapper).WrappedContext = context;
			Arguments[Arguments.Length - 2] = callback;
			Arguments[Arguments.Length - 1] = state;

			object value = Handler.ExecuteAction(Context, Controller, Arguments);
			if (!(value is IAsyncResult))
			{
				Handler.RenderAction(Context, value);
				context.Response.End(); // TODO: How to finish off non Async?
				return null;
			}
			else
				return (IAsyncResult)value;
		}